/* Club Membership Plugin Styles */

/* Hide #clubjoin element for logged-in users */
body.logged-in #clubjoin {
    display: none !important;
}

/* Already logged in message */
.club-already-logged-in {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    padding: 14px 10px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: "Segoe UI", Tahoma, Arial, "Noto Sans Hebrew", "David", sans-serif;
    text-align: center;
}

/* === SHARED BASE === */
.club-login-form-container,
.club-register-form-container {
    font-family: "Segoe UI", Tahoma, Arial, "Noto Sans Hebrew", "David", sans-serif !important;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
}

/* Shared password wrapper (used by both login and register success) */
.club-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.club-password-wrapper input {
    flex: 1;
    padding-right: 46px !important;
}

.club-toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #9ca3af;
    line-height: 1;
    transition: color 0.2s;
}

.club-toggle-password:hover {
    color: #667eea;
}

/* Shared message styles */
.club-login-messages,
.club-register-messages {
    margin-bottom: 4px;
}

.club-form-error,
.club-form-success {
    padding: 11px 14px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 14px;
}

.club-form-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.club-form-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

/* ===================================================
   LOGIN FORM  (shortcode: [club_login_form])
   =================================================== */

.club-login-form-container {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    padding: 36px 32px !important;
    max-width: 420px;
    margin: 24px auto !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
}

.club-login-form-header h3 {
    margin: 0 0 28px 0 !important;
    color: #111827 !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    text-align: center !important;
}

.club-login-field {
    margin-bottom: 18px !important;
}

.club-login-field label {
    display: block !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    padding: 10px 0 !important;
    margin: 0 !important;
    text-align: right !important;
}

.club-login-field input[type="tel"],
.club-login-field input[type="password"] {
    display: block !important;
    width: 100% !important;
    padding: .5rem 1rem !important;
    border: 1px solid #666 !important;
    border-radius: 3px !important;
    font-size: 15px !important;
    color: #111827 !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    text-align: right !important;
    direction: ltr !important;
    transition: all .3s;
}

.club-login-field input:focus {
    outline: none !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.14) !important;
}

.club-login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4px 0 22px;
    font-size: 13px;
}

.club-remember-label {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    color: #6b7280;
    font-weight: 500;
    user-select: none;
}

.club-remember-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #667eea;
    cursor: pointer;
}

.club-lost-password {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.club-lost-password:hover {
    color: #764ba2;
    text-decoration: underline;
}

.club-login-submit {
    display: block !important;
    width: 100% !important;
    padding: 10px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    background: #000000 !important;
    border: none !important;
    border-radius: 3px !important;
    cursor: pointer !important;
    transition: background 0.2s;
    letter-spacing: 0.3px;
}

.club-login-submit:hover {
    background: #222222 !important;
}

.club-login-submit:disabled {
    opacity: 0.55 !important;
    cursor: not-allowed !important;
}

.club-login-join-link {
    margin-top: 20px !important;
    text-align: center !important;
    font-size: 14px !important;
    color: #6b7280 !important;
}

.club-login-join-link p {
    margin: 0 !important;
}

.club-login-join-link a {
    color: #667eea !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}

.club-login-join-link a:hover {
    color: #764ba2 !important;
    text-decoration: underline !important;
}

/* ===================================================
   REGISTER FORM  (shortcode: [club_register_form])
   =================================================== */

.club-register-form-container {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    padding: 31px 27px !important;
    max-width: 480px;
    margin: 20px auto !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
}

.club-register-form-header h3 {
    margin: 0 0 24px 0 !important;
    color: #111827 !important;
    font-size: 19px !important;
    font-weight: 700 !important;
    text-align: center !important;
}

.club-register-name-row {
    display: flex !important;
    gap: 10px !important;
}

.club-register-name-row .club-register-field {
    flex: 1 !important;
}

.club-register-field {
    margin-bottom: 15px !important;
}

.club-register-field label {
    display: block !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    padding: 8px 0 !important;
    margin: 0 !important;
    text-align: right !important;
}

.club-register-field input[type="text"],
.club-register-field input[type="tel"],
.club-register-field input[type="email"],
.club-register-field input[type="date"] {
    display: block !important;
    width: 100% !important;
    padding: 0.43rem 0.85rem !important;
    border: 1px solid #666 !important;
    border-radius: 3px !important;
    font-size: 13px !important;
    color: #111827 !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    text-align: right !important;
    direction: ltr !important;
    transition: all .3s;
}

.club-register-field input:focus {
    outline: none !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.14) !important;
}

.club-register-submit {
    display: block !important;
    width: 100% !important;
    padding: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    background: #000000 !important;
    border: none !important;
    border-radius: 3px !important;
    cursor: pointer !important;
    transition: background 0.2s;
    letter-spacing: 0.3px;
    margin-top: 7px;
}

.club-register-submit:hover {
    background: #222222 !important;
}

.club-register-submit:disabled {
    opacity: 0.55 !important;
    cursor: not-allowed !important;
}

/* Success block */
.club-register-success {
    text-align: center;
    padding: 10px 0;
}

.club-register-success-icon {
    font-size: 48px;
    margin-bottom: 12px;
    line-height: 1;
}

.club-register-success h4 {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin: 0 0 24px 0 !important;
}

.club-register-success-details {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 20px;
    text-align: right;
}

.club-register-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
    gap: 12px;
}

.club-register-detail-row:last-child {
    border-bottom: none;
}

.club-register-detail-label {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
}

.club-register-detail-value {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.club-success-password-input {
    border: 1px solid #d1d5db !important;
    border-radius: 3px !important;
    padding: 4px 10px !important;
    font-size: 14px !important;
    background: #fff !important;
    width: 130px !important;
    direction: ltr !important;
    padding-right: 36px !important;
}

.club-register-success-login {
    margin-top: 20px;
}

.club-register-login-btn {
    display: inline-block;
    padding: 10px 28px;
    background: #000000;
    color: #ffffff !important;
    border-radius: 3px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s;
}

.club-register-login-btn:hover {
    background: #222222;
    color: #ffffff !important;
}

.club-register-login-link {
    margin-top: 20px !important;
    text-align: center !important;
    font-size: 14px !important;
    color: #6b7280 !important;
}

.club-register-login-link p {
    margin: 0 !important;
}

.club-register-login-link a {
    color: #667eea !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}

.club-register-login-link a:hover {
    color: #764ba2 !important;
    text-decoration: underline !important;
}

/* ===================================================
   REGISTER POPUP  (shortcode: [club_register_popup trigger_id="element-id"])
   =================================================== */

.club-register-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.club-register-popup-box {
    background: #ffffff;
    border-radius: 14px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 32px 28px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: clubPopupIn 0.25s ease;
    box-sizing: border-box;
}

@keyframes clubPopupIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)     scale(1);    }
}

.club-register-popup-close {
    position: absolute;
    top: 14px;
    left: 16px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 0px 3px 3px 3px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
    z-index: 1;
}

.club-register-popup-close:hover {
    color: #111827;
    background: #f3f4f6;
}

.club-register-popup-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin: 0 0 20px 0 !important;
    text-align: center !important;
    font-family: "Segoe UI", Tahoma, Arial, "Noto Sans Hebrew", "David", sans-serif !important;
    direction: rtl;
}

/* Strip card styling from form when inside popup */
.club-register-popup-box .club-register-form-container {
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

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

/* Mobile — slide up from bottom */
@media (max-width: 600px) {
    .club-register-popup-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .club-register-popup-box {
        border-radius: 16px 16px 0 0;
        max-height: 88vh;
        padding: 24px 18px 28px;
        width: 100%;
        animation: clubPopupUp 0.28s ease;
    }

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

/* === RESPONSIVE === */
@media (max-width: 480px) {
    .club-login-form-container,
    .club-register-form-container {
        padding: 24px 16px !important;
        margin: 12px auto !important;
    }

    .club-register-name-row {
        flex-direction: column !important;
        gap: 0 !important;
    }
}
