/**
 * Toan User Registration Styles
 * timestamp: 2025-06-21 14:47:20
 * Mod by Fong on 2025-06-18--16-15-PM
 * File CSS này chứa styles cho:
 * - Popup chúc mừng khi đăng ký thành công
 * - Popup chờ khi đăng nhập Google thành công
 * - Animation và responsive design
 * - Nút đóng popup và click outside to close
 * 
 * @package UserRegistration
 * @since 1.0.0
 * 
 * @related_files
 * - wp-content/themes/astra-child-deutschfuns/assets/js/toan-user-register.js
 * - wp-content/themes/astra-child-deutschfuns/templates/fong-register.php
 */

/* ==========================================================================
   Success Popup
   ========================================================================== */

/* Popup overlay */
.toan-success-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.856);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toan-success-popup-overlay.fadeIn {
    opacity: 1;
}

/* Main popup container */
.toan-success-popup {
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    position: relative;
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.toan-success-popup.toan-popup-show {
    transform: scale(1) translateY(0);
}

/* Popup content */
.toan-success-popup__content {
    padding: 40px 30px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
}

/* Close button (X icon in top-right corner) */
.toan-success-popup__close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.3s ease;
    z-index: 10;
}

.toan-success-popup__close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.toan-success-popup__close-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.toan-success-popup__close-btn svg {
    width: 20px;
    height: 20px;
}

/* Mascot styling */
.toan-success-popup__mascot {
    margin-bottom: 20px;
}

.toan-success-popup__mascot-image {
    width: 100%;
    height: 400px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* Header text */
.toan-success-popup__header {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Title text */
.toan-success-popup__title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #f8f9fa;
    line-height: 1.4;
}

/* Description text */
.toan-success-popup__description {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #e9ecef;
    opacity: 0.95;
}

/* Button wrapper */
.toan-success-popup__button-wrapper {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Popup buttons */
.toan-success-popup__button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    min-width: 120px;
    text-align: center;
}

/* Login button (primary) */
.toan-success-popup__login-btn {
    background: #ffffff;
    color: #667eea;
    border-color: #ffffff;
}

.toan-success-popup__login-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Close button (secondary) - DEPRECATED */
.toan-success-popup__close-text-btn {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
}

.toan-success-popup__close-text-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    transform: translateY(-2px);
}

/* Prevent body scroll when popup is open */
body.toan-popup-open {
    overflow: hidden;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .toan-success-popup {
        margin: 20px;
        max-width: calc(100% - 40px);
    }
    
    .toan-success-popup__content {
        padding: 30px 20px;
    }
    
    .toan-success-popup__header {
        font-size: 24px;
    }
    
    .toan-success-popup__title {
        font-size: 18px;
    }
    
    .toan-success-popup__description {
        font-size: 14px;
    }
    
    .toan-success-popup__button-wrapper {
        flex-direction: column;
        align-items: center;
    }
    
    .toan-success-popup__button {
        width: 100%;
        max-width: 200px;
    }
    
    .toan-success-popup__mascot-image {
        /* width: 60px; */
        height: 120px;
    }
}

@media (max-width: 480px) {
    .toan-success-popup__content {
        padding: 25px 15px;
    }
    
    .toan-success-popup__header {
        font-size: 22px;
    }
    
    .toan-success-popup__title {
        font-size: 16px;
    }
    
    .toan-success-popup__button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* ==========================================================================
   Animation Keyframes
   ========================================================================== */

@keyframes toan-popup-bounce {
    0% {
        transform: scale(0.8) translateY(20px);
        opacity: 0;
    }
    50% {
        transform: scale(1.05) translateY(-5px);
        opacity: 0.8;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Alternative animation for popup entrance */
.toan-success-popup.toan-bounce-in {
    animation: toan-popup-bounce 0.5s ease-out forwards;
}

/* ==========================================================================
   Accessibility & Focus States
   ========================================================================== */

.toan-success-popup__button:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.toan-success-popup__login-btn:focus {
    outline: 3px solid #667eea;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .toan-success-popup__content {
        background: #000000;
        color: #ffffff;
    }
    
    .toan-success-popup__login-btn {
        background: #ffffff;
        color: #000000;
        border-color: #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .toan-success-popup,
    .toan-success-popup-overlay,
    .toan-success-popup__button {
        animation: none;
        transition: none;
    }
    
    .toan-success-popup.toan-popup-show {
        transform: none;
    }
}

/* ==========================================================================
   Google Login Waiting Popup
   ========================================================================== */

/* Google waiting popup overlay */
.toan-google-waiting-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toan-google-waiting-popup-overlay.fadeIn {
    opacity: 1;
}

/* Main Google waiting popup container */
.toan-google-waiting-popup {
    border-radius: 20px;
    max-width: 450px;
    width: 100%;
    position: relative;
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.toan-google-waiting-popup.toan-popup-show {
    transform: scale(1) translateY(0);
}

/* Google waiting popup content */
.toan-google-waiting-popup__content {
    padding: 40px 30px;
    text-align: center;
    background: linear-gradient(135deg, #002748 0%, #21a7a8 100%);
    color: white;
    position: relative;
}

/* Spinner container */
.toan-google-waiting-popup__spinner {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Spinner animation */
.toan-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-left: 4px solid #ffffff;
    border-radius: 50%;
    animation: toan-spin 1s linear infinite !important;
    display: inline-block;
    box-sizing: border-box;
    position: relative;
    /* Force hardware acceleration */
    transform: translateZ(0);
    -webkit-animation: toan-spin 1s linear infinite !important;
    -moz-animation: toan-spin 1s linear infinite !important;
    -o-animation: toan-spin 1s linear infinite !important;
}

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

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

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

/* Alternative spinner styles for better compatibility */
.toan-spinner::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 4px solid transparent;
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    animation: toan-spin-alt 0.8s linear infinite !important;
}

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

/* Fallback spinner using CSS transforms */
.toan-spinner-fallback {
    width: 50px;
    height: 50px;
    position: relative;
    display: inline-block;
}

.toan-spinner-fallback::after {
    content: '';
    position: absolute;
    width: 42px;
    height: 42px;
    margin: 4px;
    border-radius: 50%;
    border: 4px solid #ffffff;
    border-color: #ffffff transparent #ffffff transparent;
    animation: toan-dual-ring 1.2s linear infinite !important;
}

@keyframes toan-dual-ring {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Google waiting header text */
.toan-google-waiting-popup__header {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Google waiting title text */
.toan-google-waiting-popup__title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #f8f9fa;
    line-height: 1.4;
}

/* Google waiting description text */
.toan-google-waiting-popup__description {
    font-size: 15px;
    line-height: 1.6;
    color: #e9ecef;
    opacity: 0.95;
}

/* ==========================================================================
   Responsive Design for Google Waiting Popup
   ========================================================================== */

@media (max-width: 768px) {
    .toan-google-waiting-popup {
        margin: 20px;
        max-width: calc(100% - 40px);
    }
    
    .toan-google-waiting-popup__content {
        padding: 30px 20px;
    }
    
    .toan-google-waiting-popup__header {
        font-size: 22px;
    }
    
    .toan-google-waiting-popup__title {
        font-size: 16px;
    }
    
    .toan-google-waiting-popup__description {
        font-size: 14px;
    }
    
    .toan-spinner {
        width: 40px;
        height: 40px;
        border-width: 3px;
    }
}

@media (max-width: 480px) {
    .toan-google-waiting-popup__content {
        padding: 25px 15px;
    }
    
    .toan-google-waiting-popup__header {
        font-size: 20px;
    }
    
    .toan-google-waiting-popup__title {
        font-size: 15px;
    }
    
    .toan-spinner {
        width: 35px;
        height: 35px;
    }
}

/* ==========================================================================
   Accessibility and Animation Preferences
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .toan-google-waiting-popup,
    .toan-google-waiting-popup-overlay {
        transition: none;
    }
    
    .toan-spinner {
        animation: none;
        border-left-color: transparent;
        border-top-color: #ffffff;
    }
    
    .toan-google-waiting-popup.toan-popup-show {
        transform: none;
    }
} 