﻿/* ============================================
   CSS FOR JAVASCRIPT ENHANCEMENTS
   Save as: /wwwroot/css/patient-experience.css
   ============================================ */

/* Welcome Modal */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

    .welcome-overlay.show {
        opacity: 1;
        visibility: visible;
    }

.welcome-modal {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.welcome-overlay.show .welcome-modal {
    transform: scale(1);
}

.welcome-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

    .welcome-close:hover {
        color: #666;
    }

.welcome-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: gentlePulse 2s ease-in-out infinite;
}

.welcome-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
}

.welcome-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(77, 127, 122, 0.05);
    border-radius: 12px;
    text-align: left;
}

.feature-icon {
    font-size: 1.5rem;
}

.welcome-note {
    margin-top: 1rem;
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}

/* Form Hints */
.form-hint.caring {
    color: var(--primary-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(77, 127, 122, 0.05);
    border-radius: 8px;
    animation: slideIn 0.3s ease;
}

.field-focused {
    position: relative;
}

    .field-focused::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: var(--primary-color);
        animation: expandWidth 0.3s ease;
    }

/* Verified Badge */
.verified-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(77, 127, 122, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(77, 127, 122, 0.2);
}

.read-time {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    color: #999;
    font-size: 0.75rem;
}

/* Welcome Back Banner */
.welcome-back-banner {
    background: linear-gradient(90deg, rgba(77, 127, 122, 0.1), rgba(240, 227, 209, 0.1));
    padding: 0.75rem 1rem;
    text-align: center;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    animation: slideDown 0.5s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    z-index: 999;
}

.close-banner {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 0 0.5rem;
}

/* Custom Error Messages */
.custom-error.gentle {
    color: var(--primary-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(226, 187, 116, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--highlight-color);
    animation: slideIn 0.3s ease;
}

.error-icon {
    margin-right: 0.25rem;
}

/* Loading Messages */
.loading-message {
    margin-top: 1rem;
    color: var(--primary-color);
    font-size: 0.9rem;
    animation: fadeInOut 2s ease infinite;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes gentleBounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes expandWidth {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .welcome-modal {
        padding: 2rem 1.5rem;
        width: 95%;
    }

    .welcome-icon {
        font-size: 3rem;
    }

    .welcome-features {
        gap: 0.75rem;
    }

    .welcome-feature {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .feature-icon {
        font-size: 1.25rem;
    }

    .welcome-back-banner {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
}
