/**
 * Seasonal Maintenance Alerts - Frontend Styles
 * Modern plumbing maintenance scheduler
 */

/* CSS Custom Properties for Design System */
:root {
    --sma-primary: #2563eb;
    --sma-primary-dark: #1d4ed8;
    --sma-primary-light: #dbeafe;
    --sma-success: #059669;
    --sma-success-light: #d1fae5;
    --sma-warning: #d97706;
    --sma-warning-light: #fed7aa;
    --sma-danger: #dc2626;
    --sma-danger-light: #fecaca;
    --sma-gray-50: #f9fafb;
    --sma-gray-100: #f3f4f6;
    --sma-gray-200: #e5e7eb;
    --sma-gray-300: #d1d5db;
    --sma-gray-400: #9ca3af;
    --sma-gray-500: #6b7280;
    --sma-gray-600: #4b5563;
    --sma-gray-700: #374151;
    --sma-gray-800: #1f2937;
    --sma-gray-900: #111827;
    --sma-white: #ffffff;
    --sma-radius: 12px;
    --sma-radius-sm: 8px;
    --sma-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --sma-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --sma-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --sma-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --sma-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Main Container */
.sma-maintenance-scheduler {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    color: var(--sma-gray-800);
    background: var(--sma-gray-50);
    border-radius: var(--sma-radius);
}

/* Header */
.sma-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 32px;
    background: linear-gradient(135deg, var(--sma-white) 0%, var(--sma-gray-50) 100%);
    border-radius: var(--sma-radius);
    box-shadow: var(--sma-shadow);
}

.sma-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--sma-gray-900);
    margin-bottom: 12px;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, var(--sma-primary) 0%, var(--sma-primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sma-description {
    font-size: 18px;
    color: var(--sma-gray-600);
    margin-bottom: 0;
    font-weight: 400;
    line-height: 1.6;
}

/* Form Styles */
.sma-questionnaire {
    background: var(--sma-white);
    padding: 40px;
    border-radius: var(--sma-radius);
    border: 1px solid var(--sma-gray-200);
    margin-bottom: 32px;
    box-shadow: var(--sma-shadow-md);
    position: relative;
    overflow: hidden;
}

.sma-questionnaire::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--sma-primary) 0%, var(--sma-success) 50%, var(--sma-warning) 100%);
}

.sma-form-group {
    margin-bottom: 32px;
}

.sma-label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--sma-gray-900);
    font-size: 16px;
    letter-spacing: -0.01em;
}

.sma-select,
.sma-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--sma-gray-200);
    border-radius: var(--sma-radius-sm);
    font-size: 16px;
    background: var(--sma-white);
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.sma-select:hover,
.sma-input:hover {
    border-color: var(--sma-gray-300);
}

.sma-select:focus,
.sma-input:focus {
    outline: none;
    border-color: var(--sma-primary);
    box-shadow: 0 0 0 3px var(--sma-primary-light);
    transform: translateY(-1px);
}

.sma-help-text {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: var(--sma-gray-500);
    line-height: 1.4;
}

/* Buttons */
.sma-form-actions {
    text-align: center;
    margin-top: 40px;
}

.sma-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border: none;
    border-radius: var(--sma-radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    min-width: 200px;
    font-family: inherit;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.sma-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.sma-button:hover::before {
    left: 100%;
}

.sma-button-primary {
    background: linear-gradient(135deg, var(--sma-primary) 0%, var(--sma-primary-dark) 100%);
    color: var(--sma-white);
    box-shadow: var(--sma-shadow);
}

.sma-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--sma-shadow-lg);
}

.sma-button-success {
    background: linear-gradient(135deg, var(--sma-success) 0%, #047857 100%);
    color: var(--sma-white);
    box-shadow: var(--sma-shadow);
}

.sma-button-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--sma-shadow-lg);
}

.sma-button-secondary {
    background: var(--sma-gray-100);
    color: var(--sma-gray-700);
    border: 2px solid var(--sma-gray-200);
}

.sma-button-secondary:hover {
    background: var(--sma-gray-200);
    border-color: var(--sma-gray-300);
    transform: translateY(-1px);
}

/* Loading State */
.sma-loading {
    text-align: center;
    padding: 60px 40px;
    background: var(--sma-white);
    border-radius: var(--sma-radius);
    border: 1px solid var(--sma-gray-200);
    box-shadow: var(--sma-shadow-md);
}

.sma-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--sma-gray-200);
    border-top: 4px solid var(--sma-primary);
    border-radius: 50%;
    animation: sma-spin 1s linear infinite;
    margin: 0 auto 20px;
}

.sma-loading p {
    color: var(--sma-gray-600);
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

@keyframes sma-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results Section */
.sma-results {
    background: var(--sma-white);
    border: 1px solid var(--sma-gray-200);
    border-radius: var(--sma-radius);
    overflow: hidden;
    margin-bottom: 32px;
    box-shadow: var(--sma-shadow-lg);
}

.sma-results-header {
    background: #f8f9fa;
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
}

.sma-results-header h4 {
    margin: 0 0 10px 0;
    font-size: 22px;
    color: #2c3e50;
}

.sma-results-description {
    margin: 0;
    color: #666;
}

.sma-schedule-preview {
    padding: 30px;
}

/* Enhanced Seasonal Calendar Display */
.sma-schedule-calendar {
    background: linear-gradient(135deg, var(--sma-gray-50) 0%, var(--sma-white) 100%);
    border-radius: var(--sma-radius);
    padding: 32px;
    margin-bottom: 24px;
}

.sma-schedule-overview {
    text-align: center;
    margin-bottom: 40px;
    padding: 32px;
    background: var(--sma-white);
    border-radius: var(--sma-radius);
    box-shadow: var(--sma-shadow-md);
    border: 1px solid var(--sma-gray-200);
    position: relative;
    overflow: hidden;
}

.sma-schedule-overview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--sma-primary) 0%, var(--sma-success) 50%, var(--sma-warning) 100%);
}

.sma-overview-title {
    font-size: 28px;
    color: var(--sma-gray-900);
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.sma-overview-stats {
    font-size: 18px;
    color: var(--sma-gray-600);
    margin: 0;
    font-weight: 500;
}

.sma-season-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.sma-season-card {
    background: var(--sma-white);
    border-radius: var(--sma-radius);
    box-shadow: var(--sma-shadow-md);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--sma-gray-200);
    position: relative;
}

.sma-season-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: all 0.3s ease;
}

.sma-season-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sma-shadow-xl);
}

.sma-season-card.spring::before {
    background: linear-gradient(90deg, var(--sma-success) 0%, #10b981 100%);
}

.sma-season-card.summer::before {
    background: linear-gradient(90deg, var(--sma-warning) 0%, #f59e0b 100%);
}

.sma-season-card.fall::before {
    background: linear-gradient(90deg, #ea580c 0%, #dc2626 100%);
}

.sma-season-card.winter::before {
    background: linear-gradient(90deg, var(--sma-primary) 0%, #1e40af 100%);
}

.sma-season-card.all-season::before {
    background: linear-gradient(90deg, #8b5cf6 0%, #7c3aed 100%);
}

.sma-season-header {
    padding: 24px;
    background: linear-gradient(135deg, var(--sma-gray-50) 0%, var(--sma-white) 100%);
    border-bottom: 1px solid var(--sma-gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sma-season-icon {
    font-size: 28px;
    margin-right: 12px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.sma-season-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--sma-gray-900);
    flex: 1;
    letter-spacing: -0.01em;
}

.sma-task-count {
    background: var(--sma-primary);
    color: var(--sma-white);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--sma-shadow-sm);
}

.sma-season-tasks {
    padding: 24px;
    list-style: none;
    margin: 0;
}

.sma-season-card.spring .sma-task-count {
    background: var(--sma-success);
}

.sma-season-card.summer .sma-task-count {
    background: var(--sma-warning);
}

.sma-season-card.fall .sma-task-count {
    background: #ea580c;
}

.sma-season-card.winter .sma-task-count {
    background: var(--sma-primary);
}

.sma-season-card.all-season .sma-task-count {
    background: #8b5cf6;
}

.sma-task-season {
    margin-bottom: 30px;
}

.sma-season-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.sma-task-item {
    background: var(--sma-gray-50);
    padding: 18px 20px;
    margin-bottom: 12px;
    border-radius: var(--sma-radius-sm);
    border-left: 4px solid var(--sma-primary);
    transition: all 0.2s ease;
    box-shadow: var(--sma-shadow-sm);
    border: 1px solid var(--sma-gray-200);
    position: relative;
}

.sma-task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.sma-task-item:hover {
    background: var(--sma-white);
    transform: translateX(6px);
    box-shadow: var(--sma-shadow-md);
    border-color: var(--sma-gray-300);
}

.sma-task-item.critical {
    border-left-color: var(--sma-danger);
    background: var(--sma-danger-light);
}

.sma-task-item.critical:hover {
    background: #fef2f2;
}

.sma-task-item.recommended {
    border-left-color: var(--sma-warning);
    background: var(--sma-warning-light);
}

.sma-task-item.recommended:hover {
    background: #fffbeb;
}

.sma-task-item.optional {
    border-left-color: var(--sma-gray-400);
    background: var(--sma-gray-100);
}

.sma-task-item.optional:hover {
    background: var(--sma-white);
}

.sma-task-info {
    flex: 1;
}

.sma-task-name {
    font-weight: 600;
    color: var(--sma-gray-900);
    margin-bottom: 5px;
}

.sma-task-timing {
    font-size: 14px;
    color: var(--sma-gray-600);
    margin-bottom: 4px;
}

.sma-task-cost {
    font-size: 13px;
    color: var(--sma-success);
    font-weight: 600;
    margin-bottom: 8px;
}

.sma-task-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.sma-task-badges {
    display: flex;
    gap: 8px;
    align-items: center;
}

.sma-badge {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    box-shadow: var(--sma-shadow-sm);
}

.sma-badge-diy {
    background: var(--sma-success-light);
    color: var(--sma-success);
    border: 1px solid #a7f3d0;
}

.sma-badge-professional {
    background: var(--sma-primary-light);
    color: var(--sma-primary-dark);
    border: 1px solid #bfdbfe;
}

.sma-badge-critical {
    background: var(--sma-danger-light);
    color: var(--sma-danger);
    border: 1px solid #fecaca;
}

.sma-badge-recommended {
    background: var(--sma-warning-light);
    color: var(--sma-warning);
    border: 1px solid #fed7aa;
}

.sma-badge-optional {
    background: var(--sma-gray-100);
    color: var(--sma-gray-600);
    border: 1px solid var(--sma-gray-200);
}

/* Info Toggle Button */
.sma-info-toggle {
    background: transparent;
    border: 1px solid var(--sma-primary);
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.2s ease;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--sma-primary);
    font-weight: 500;
    flex-shrink: 0;
    font-size: 12px;
}

.sma-info-text {
    font-size: 12px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

.sma-info-toggle:hover {
    background: var(--sma-primary);
    color: var(--sma-white);
    transform: translateY(-1px);
    box-shadow: var(--sma-shadow-sm);
}

.sma-info-toggle.sma-info-active {
    background: var(--sma-primary);
    color: var(--sma-white);
}

.sma-info-toggle:focus {
    outline: 2px solid var(--sma-primary);
    outline-offset: 2px;
}

/* Expandable Task Details */
.sma-task-details {
    margin-top: 16px;
    padding: 16px;
    background: var(--sma-white);
    border-radius: var(--sma-radius-sm);
    border: 1px solid var(--sma-gray-300);
    animation: sma-details-fade-in 0.3s ease-out;
    width: 100%;
    box-sizing: border-box;
}

.sma-task-details > div {
    margin-bottom: 12px;
    line-height: 1.5;
    font-size: 14px;
}

.sma-task-details > div:last-child {
    margin-bottom: 0;
}

.sma-task-description {
    color: var(--sma-gray-700);
}

.sma-task-importance {
    color: var(--sma-gray-700);
}

.sma-task-emergency-cost {
    color: var(--sma-danger);
    font-weight: 600;
    background: var(--sma-danger-light);
    padding: 8px 12px;
    border-radius: var(--sma-radius-sm);
    border: 1px solid #fecaca;
}

@keyframes sma-details-fade-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }
}

/* Download Section */
.sma-download-section {
    background: linear-gradient(135deg, var(--sma-success-light) 0%, #ecfdf5 100%);
    padding: 32px;
    text-align: center;
    border-top: 1px solid var(--sma-gray-200);
    position: relative;
}

.sma-download-section::before {
    content: '🎉';
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    opacity: 0.6;
}

.sma-download-help {
    margin: 16px 0 0 0;
    font-size: 15px;
    color: var(--sma-gray-600);
    font-weight: 500;
}

.sma-new-schedule {
    padding: 24px 32px;
    text-align: center;
    border-top: 1px solid var(--sma-gray-200);
    background: var(--sma-gray-50);
}

/* FAQ Section */
.sma-faq-section {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
}

.sma-faq-title {
    font-size: 22px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.sma-faq-intro {
    color: #666;
    margin-bottom: 25px;
}

.sma-faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.sma-faq-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.sma-faq-question {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 16px;
}

.sma-faq-answer {
    color: #666;
    margin: 0;
    line-height: 1.5;
}

.sma-disclaimer {
    background: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.sma-disclaimer p {
    margin: 0;
    color: #856404;
}

/* Error State */
.sma-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.sma-error-content h4 {
    margin-top: 0;
    color: #721c24;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sma-maintenance-scheduler {
        padding: 15px;
    }
    
    .sma-questionnaire {
        padding: 20px;
    }
    
    .sma-title {
        font-size: 24px;
    }
    
    .sma-button {
        min-width: auto;
        width: 100%;
        padding: 16px 20px;
    }
    
    .sma-task-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .sma-task-badges {
        align-self: flex-end;
    }
    
    .sma-faq-grid {
        grid-template-columns: 1fr;
    }
    
    .sma-results-header,
    .sma-schedule-preview,
    .sma-download-section,
    .sma-new-schedule {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .sma-maintenance-scheduler {
        padding: 10px;
    }
    
    .sma-questionnaire {
        padding: 15px;
    }
    
    .sma-title {
        font-size: 20px;
    }
    
    .sma-faq-section {
        padding: 20px;
    }
    
    .sma-season-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .sma-season-header {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .sma-season-icon {
        margin-right: 8px;
    }
    
    .sma-task-count {
        align-self: flex-end;
    }
    
    .sma-overview-title {
        font-size: 20px;
    }
    
    .sma-schedule-calendar {
        padding: 15px;
    }
    
    .sma-schedule-overview {
        padding: 15px;
    }
    
    .sma-task-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sma-task-actions {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 12px;
    }
    
    .sma-task-details {
        margin-top: 12px;
        padding: 12px;
    }
    
    .sma-info-toggle {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .sma-info-text {
        font-size: 11px;
    }
}
