/* =============================================
   Musiveo Login - Frontend Styles
   Dark grey theme (default)
   ============================================= */

/* --- Google Sign-In Button Container --- */
.musiveo-google-container {
    margin-bottom: 16px;
    text-align: center;
    width: 100%;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.musiveo-google-container iframe {
    max-width: inherit;
    height: auto;
}

.musiveo-google-container.musiveo-google-loading {
    opacity: 0.6;
    pointer-events: none;
}

.musiveo-google-container.musiveo-google-loading::after {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    margin: 8px auto 0;
    border: 2px solid #555;
    border-top-color: var(--color-primary, #22c55e);
    border-radius: 50%;
    animation: musiveo-spin 0.6s linear infinite;
}

@keyframes musiveo-spin {
    to { transform: rotate(360deg); }
}

/* --- Separator --- */
.musiveo-separator {
    display: flex;
    align-items: center;
    margin: 16px 0;
    gap: 12px;
    color: #888;
    font-size: 13px;
}

.musiveo-separator::before,
.musiveo-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.musiveo-separator span {
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Email Verification Animation --- */
.musiveo-email-anim {
    text-align: center;
    padding: 24px 0;
    animation: musiveo-fadeIn 0.5s ease-out;
}

.musiveo-email-anim-icon img {
    max-width: 80px;
    height: auto;
    margin: 0 auto 16px;
    display: block;
}

.musiveo-email-anim-visible {
    animation: musiveo-fadeIn 0.5s ease-out;
}

@keyframes musiveo-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Activation Message --- */
.musiveo-activation-message {
    text-align: center;
    padding: 24px;
    margin-bottom: 20px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    animation: musiveo-fadeIn 0.5s ease-out;
}

.musiveo-activation-icon {
    margin-bottom: 12px;
}

.musiveo-activation-icon svg {
    display: inline-block;
}

.musiveo-activation-text {
    color: #166534;
    font-size: 15px;
    margin: 0;
    font-weight: 500;
}

/* =============================================
   Welcome Modal - DARK GREY THEME (default)
   ============================================= */

/* --- Welcome Modal Overlay --- */
.musiveo-welcome-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(6px);
}

.musiveo-welcome-overlay.musiveo-welcome-visible {
    opacity: 1;
}

/* --- Welcome Modal Card (Dark Grey) --- */
.musiveo-welcome-modal {
    background: #2a2a2a;
    border-radius: 16px;
    padding: 48px 40px 40px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid #3a3a3a;
}

.musiveo-welcome-overlay.musiveo-welcome-visible .musiveo-welcome-modal {
    transform: scale(1) translateY(0);
}

/* --- Welcome Icon --- */
.musiveo-welcome-icon {
    margin-bottom: 24px;
}

.musiveo-welcome-icon svg {
    display: inline-block;
    filter: drop-shadow(0 4px 12px rgba(34, 197, 94, 0.3));
}

.musiveo-check-anim {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: musiveo-draw 0.6s 0.3s ease forwards;
}

@keyframes musiveo-draw {
    to { stroke-dashoffset: 0; }
}

/* --- Welcome Text (Dark Theme) --- */
.musiveo-welcome-title {
    font-size: 22px;
    font-weight: 600;
    color: #f0f0f0;
    margin: 0 0 8px;
    line-height: 1.3;
}

.musiveo-welcome-text {
    font-size: 15px;
    color: #aaa;
    margin: 0 0 28px;
    line-height: 1.5;
}

/* --- Welcome Continue Button --- */
.musiveo-welcome-continue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 40px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    background: var(--color-primary, #22c55e);
    color: #fff;
}

.musiveo-welcome-continue:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.musiveo-welcome-continue:active {
    transform: translateY(0);
}

/* --- Body Modal Lock --- */
body.musiveo-modal-open {
    overflow: hidden;
}

/* --- Responsive --- */
@media (max-width: 480px) {
    .musiveo-welcome-modal {
        padding: 36px 24px 28px;
        border-radius: 12px;
        width: 95%;
    }

    .musiveo-welcome-title {
        font-size: 19px;
    }

    .musiveo-welcome-text {
        font-size: 14px;
    }

    .musiveo-email-anim-icon img {
        max-width: 64px;
    }
}

/* =============================================
   Toast Notification (after successful login)
   ============================================= */
.musiveo-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%) scale(0.95);
    z-index: 999999999;
    max-width: 420px;
    width: 90%;
    background: rgba(31, 31, 31, 0.94);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(34, 197, 94, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(34, 197, 94, 0.1);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    overflow: hidden;
}

.musiveo-toast.musiveo-toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
    pointer-events: auto;
}

.musiveo-toast-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.musiveo-toast-icon svg {
    width: 20px;
    height: 20px;
    color: #22c55e;
}

.musiveo-toast-content {
    flex: 1;
    min-width: 0;
}

.musiveo-toast-title {
    font-size: 14px;
    font-weight: 600;
    color: #f0f0f0;
    margin: 0 0 2px;
    line-height: 1.3;
}

.musiveo-toast-desc {
    font-size: 12px;
    color: #aaa;
    margin: 0;
    line-height: 1.4;
}

.musiveo-toast-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    color: #888;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.musiveo-toast-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.musiveo-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 0 0 12px 12px;
    animation: musiveo-toast-progress 3s linear forwards;
}

@keyframes musiveo-toast-progress {
    from { width: 100%; }
    to { width: 0; }
}

/* --- Light theme toast --- */
html.light .musiveo-toast {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(34, 197, 94, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 0 15px rgba(34, 197, 94, 0.08);
}

html.light .musiveo-toast-title {
    color: #1a1a1a;
}

html.light .musiveo-toast-desc {
    color: #666;
}

html.light .musiveo-toast-close {
    background: rgba(0, 0, 0, 0.05);
    color: #888;
}

html.light .musiveo-toast-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

@media (max-width: 480px) {
    .musiveo-toast {
        top: 12px;
        width: 95%;
    }
}

/* --- Light Theme Override (if theme uses .light class) --- */
html.light .musiveo-welcome-overlay {
    background: rgba(0, 0, 0, 0.4);
}

html.light .musiveo-welcome-modal {
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

html.light .musiveo-welcome-title {
    color: #1a1a1a;
}

html.light .musiveo-welcome-text {
    color: #666;
}

html.light .musiveo-separator {
    color: #666;
}

html.light .musiveo-separator::before,
html.light .musiveo-separator::after {
    background: #ddd;
}

html.light .musiveo-activation-message {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

html.light .musiveo-activation-text {
    color: #166534;
}
