/**
 * DLM Elementor Widgets Styles
 */

/* Base Styles */
.dlm-pricing-widget {
    --primary-color: #667eea;
    --accent-color: #764ba2;
    --success-color: #00a32a;
    --error-color: #d63638;
    --border-color: #e1e5e9;
    --text-color: #333;
    --light-bg: #f8f9fa;
}

/* Loading Animation */
@keyframes dlm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.dlm-loading {
    text-align: center;
    padding: 20px;
    color: var(--primary-color);
}

.dlm-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 2px solid var(--primary-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: dlm-spin 1s linear infinite;
}

/* Message Styles */
.dlm-message {
    padding: 15px;
    border-radius: 6px;
    margin: 15px;
    font-weight: 500;
}

.dlm-message.success {
    background: #d1eddb;
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.dlm-message.error {
    background: #f8d7da;
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

.dlm-message p {
    margin: 0;
    line-height: 1.5;
}

/* Responsive Improvements */
@media (max-width: 480px) {
    .dlm-modal-container {
        margin: 10px;
        max-height: 95vh;
    }

    .dlm-modal-header,
    .dlm-modal-body,
    .dlm-modal-footer {
        padding: 15px;
    }

    .dlm-form-group input,
    .dlm-form-group select {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .dlm-form-group input::placeholder {
      color: #ccc;
    }

    .dlm-btn-primary,
    .dlm-btn-secondary {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* Focus States */
.dlm-form-group input:focus,
.dlm-form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Button States */
.dlm-plan-button:disabled,
.dlm-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Card Hover Effects */
.dlm-plan-card {
    will-change: transform;
}

.dlm-plan-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -1;
}

.dlm-plan-card.highlighted::after {
    opacity: 0.05;
}

/* Accessibility */
.dlm-modal-close:focus,
.dlm-plan-button:focus,
.dlm-btn-primary:focus,
.dlm-btn-secondary:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Screen Reader Only */
.dlm-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Print Styles */
@media print {
    .dlm-modal {
        display: none !important;
    }

    .dlm-plan-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .dlm-plan-card {
        border-width: 3px;
    }

    .dlm-plan-button {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .dlm-plan-card,
    .dlm-plan-button,
    .dlm-modal-backdrop {
        transition: none;
    }

    .dlm-loading::before {
        animation: none;
    }
}
