/**
 * @file: login-popup.css
 * @description: Попап з BuddyBoss формою логіну/реєстрації
 * @created: 2025-11-12
 */

/* ============================================
   POPUP OVERLAY
   ============================================ */

.gotuimo-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============================================
   POPUP CONTAINER
   ============================================ */

.gotuimo-popup-container {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   CLOSE BUTTON
   ============================================ */

.gotuimo-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.gotuimo-popup-close:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.05);
    transform: rotate(90deg);
}

/* ============================================
   POPUP CONTENT
   ============================================ */

.gotuimo-popup-content {
    padding: 40px 30px;
}

/* ============================================
   BUTTON STYLES (щоб button виглядав як link)
   ============================================ */

button.gotuimo-cta-primary {
    /* ✅ Скидаємо браузерні стилі button */
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    
    /* ✅ Єдиний стиль: біла кнопка → червона при hover */
    display: inline-block;
    padding: 14px 32px;
    background: #ffffff;
    color: #ef4444;
    border: 2px solid #ef4444;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
    transition: all 0.3s ease;
}

button.gotuimo-cta-primary:hover {
    background: #ef4444;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(239, 68, 68, 0.4);
}

/* ============================================
   BUDDYBOSS FORM OVERRIDES
   ============================================ */

.gotuimo-popup-content .bb-login-form,
.gotuimo-popup-content #buddypress {
    margin: 0;
}

.gotuimo-popup-content h3,
.gotuimo-popup-content h4 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    text-align: center;
}

.gotuimo-popup-content input[type="text"],
.gotuimo-popup-content input[type="email"],
.gotuimo-popup-content input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.gotuimo-popup-content input[type="text"]:focus,
.gotuimo-popup-content input[type="email"]:focus,
.gotuimo-popup-content input[type="password"]:focus {
    outline: none;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.gotuimo-popup-content button[type="submit"],
.gotuimo-popup-content input[type="submit"],
.gotuimo-register-form-wrapper .button,
.gotuimo-register-form-wrapper .button-primary,
.gotuimo-register-form-wrapper #wp-submit-register,
.gotuimo-login-form-wrapper input[type="submit"],
.gotuimo-login-form-wrapper button[type="submit"] {
    width: 100%;
    padding: 14px 24px;
    /* ✅ Єдиний стиль: біла кнопка → червона при hover */
    background: #ffffff !important; /* ✅ Force override WordPress */
    color: #ef4444 !important;
    border: 2px solid #ef4444 !important;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15) !important;
}

.gotuimo-popup-content button[type="submit"]:hover,
.gotuimo-popup-content input[type="submit"]:hover,
.gotuimo-register-form-wrapper .button:hover,
.gotuimo-register-form-wrapper .button-primary:hover,
.gotuimo-register-form-wrapper #wp-submit-register:hover,
.gotuimo-login-form-wrapper input[type="submit"]:hover,
.gotuimo-login-form-wrapper button[type="submit"]:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}

/* ============================================
   FALLBACK FORM STYLES
   ============================================ */

.gotuimo-popup-content .login {
    max-width: 100%;
}

.gotuimo-popup-content .login label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.gotuimo-popup-content .login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 1rem;
}

.gotuimo-popup-content .login-remember input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.gotuimo-register-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.gotuimo-register-link a {
    color: #ef4444;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.gotuimo-register-link a:hover {
    color: #dc2626;
    text-decoration: underline;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 600px) {
    .gotuimo-popup-container {
        max-width: 100%;
        margin: 0;
        border-radius: 16px 16px 0 0;
        max-height: 95vh;
    }
    
    .gotuimo-popup-content {
        padding: 30px 20px;
    }
    
    button.gotuimo-cta-primary {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

/* ============================================
   REGISTER FORM STYLING
   ============================================ */

.gotuimo-register-form-wrapper h2 {
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.gotuimo-register-form-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #444;
}

.gotuimo-register-form-wrapper .input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.gotuimo-register-form-wrapper .input:focus {
    outline: none;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.gotuimo-register-form-wrapper p {
    margin-bottom: 16px;
}

.gotuimo-register-form-wrapper .submit {
    margin-top: 20px;
}

.gotuimo-register-form-wrapper .button {
    width: 100%;
    padding: 14px 24px;
    /* ✅ Єдиний стиль: біла кнопка → червона при hover */
    background: #ffffff;
    color: #ef4444;
    border: 2px solid #ef4444;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

.gotuimo-register-form-wrapper .button:hover {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.gotuimo-switch-form {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.gotuimo-switch-form a {
    color: #ef4444;
    text-decoration: none;
    font-weight: 600;
}

.gotuimo-switch-form a:hover {
    color: #dc2626;
    text-decoration: underline;
}

