/* Custom Authentication Plugin Styles */

/* Password confirmation validation styles */
.cap-form-group input.error {
    border-color: #ffb700 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.cap-form-group input:focus.error {
    border-color: #ffb700 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.field-error {
    color: #ffb700;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.password-match-check {
    color: #28a745;
    margin-left: 5px;
    font-size: 14px;
    font-weight: bold;
}

.cap-field-help {
    font-size: 12px;
    margin-top: 5px;
    display: block;
    transition: color 0.3s ease;
}

/* Hide reCAPTCHA badge completely */
.grecaptcha-badge {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Alternative method to hide reCAPTCHA elements */
.rc-anchor {
    display: none !important;
}

.rc-anchor-invisible {
    display: none !important;
}

.rc-anchor-light {
    display: none !important;
}

.rc-anchor-invisible-hover {
    display: none !important;
}


/* Popup Modal Styles */
.cap-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.cap-popup-overlay.show {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.cap-popup-modal {
    background: #3c5388 ;
    border-radius: 12px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

.cap-popup-icon {
    width: 60px;
    height: 60px;
    background: #ff8630;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
}

.cap-popup-icon::before {
    content: "✓";
    font-weight: bold;
}

.cap-popup-title {
    color: #e2e8f0;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.cap-popup-description {
    color: #a0aec0;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 25px 0;
}

.cap-popup-button {
    background: #ff8630;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    text-decoration: none;
}

.cap-popup-button:hover {
    background: #e67e22;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 134, 48, 0.3);
}

.cap-popup-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 134, 48, 0.3);
}

.cap-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #a0aec0;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.cap-popup-close:hover,
.cap-popup-close:focus {
    background: #333;
    color: #e2e8f0;
}

.cap-popup-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 134, 48, 0.5);
}

.cap-popup-close:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

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

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

/* Responsive popup styles */
@media (max-width: 768px) {
    .cap-popup-modal {
        margin: 20px;
        padding: 25px 20px;
        max-width: none;
        width: calc(100% - 40px);
    }
    
    .cap-popup-title {
        font-size: 20px;
    }
    
    .cap-popup-description {
        font-size: 14px;
    }
    
    .cap-popup-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

.cap-auth-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    background: #3c5388 ;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    /* Ensure consistent background rendering across browsers */
    -webkit-appearance: none;
    appearance: none;
}

.cap-logged-in-message {
    text-align: center;
    padding: 20px;
    margin: 0 auto 20px;
    background: #3c5388;
    border-radius: 24px;
    width: 50%;
}

.cap-logged-in-message p {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #ffffff;
}

.cap-user-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.cap-my-account-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #ff8630;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.2s;
}

.cap-my-account-btn:hover {
    background: #e67e00;
    color: white;
    text-decoration: none;
}

.cap-logout-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #ff8630;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.2s;
}

.cap-logout-btn:hover {
    background: #ff8630;
    color: white;
    text-decoration: none;
}

.cap-form-section {
    margin-bottom: 10px;
}

.cap-form-section h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
    color: #e2e8f0;
    text-align: center;
}
.cap-form-section {
    text-align: center;
}
span.tit-men {
    font-size: 24px;
    font-weight: 600;
    color: #e2e8f0;
    text-align: center;
}
.cap-form {
    margin: 0;
}

.cap-form-group {
    margin-bottom: 10px;
}

.cap-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.4;
}

.cap-form-group input[type="text"],
.cap-form-group input[type="email"],
.cap-form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #3c5388 ;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.cap-form-group input[type="text"]:focus,
.cap-form-group input[type="email"]:focus,
.cap-form-group input[type="password"]:focus {
    outline: none;
    border-color: #ff8630;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Help text */
.cap-form-group small {
    color: #a0aec0;
    font-size: 12px;
    margin-top: 5px;
    display: block;
    line-height: 1.4;
}

/* Required field indicators */
.cap-required {
    color: #ff8630;
    font-weight: bold;
    margin-left: 2px;
}

/* Help text */
.cap-field-help {
    color: #718096;
    font-size: 11px;
    margin-top: 3px;
    display: block;
    line-height: 1.3;
    font-style: italic;
}

/* Error field styling */
.cap-error-field {
    border-color: #e53e3e !important;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.2) !important;
}

.cap-error-field:focus {
    border-color: #c53030 !important;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.5) !important;
}

.cap-checkbox-label a {
    color: #ff8630;
    text-decoration: none;
    transition: color 0.2s;
}

.cap-checkbox-label a:hover {
    color: #ff6216;
    text-decoration: underline;
}

.cap-checkbox-label {
    display: inline-block !important;
    font-weight: normal !important;
    cursor: pointer;
    position: relative;
    line-height: 1.4;
    margin-bottom: 15px;
    padding: 0;
    vertical-align: top;
}

.cap-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.cap-checkbox-custom {
    position: relative;
    display: inline-block;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #e1e5e9;
    border-radius: 3px;
    margin-right: 12px;
    margin-top: 2px;
    vertical-align: top;
    transition: all 0.2s;
}

.cap-checkbox-label:hover input ~ .cap-checkbox-custom {
    border-color: #ff8630;
}

.cap-checkbox-label input:checked ~ .cap-checkbox-custom {
    background-color: #ff8630;
    border-color: #ff8630;
}

.cap-checkbox-custom:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 3px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.cap-checkbox-label input:checked ~ .cap-checkbox-custom:after {
    display: block;
}

.cap-submit-btn {
    width: 100%;
    padding: 12px 20px;
    background: #ff8630;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.cap-submit-btn:hover {
    background: #ff6216;
}

.cap-submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.cap-form-message {
    margin-top: 10px;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
    display: none;
}

.cap-form-message.cap-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.cap-form-message.cap-error {
    color: #ffb700;
    border: 1px solid #3c5388 ;
    display: block;
}

/* Resend verification link styling */
.resend-verification-link {
    color: #ff8630;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s ease;
}

.resend-verification-link:hover {
    color: #ff6216;
    text-decoration: none;
}

.cap-form-toggle {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #374563;
}
.cap-form-group button.cap-submit-btn {
    background: #ff8a01;
    color: #ffffff;
    padding: 8px 30px;
}
.cap-form-group button.cap-submit-btn:hover {
    background: #ff8630;
    color: #ffffff;
}
button.cap-google-btn {
    border: 1px solid #374563;
}
button.cap-google-btn:hover {
    background: #ff8a01;
    color: #ffffff;
}
.cap-toggle-link {
    color: #ff8630;
    text-decoration: none;
    font-size: 14px;
}

.cap-toggle-link:hover {
    color: #ff6216;
    text-decoration: underline;
}

.cap-forgot-password {
    text-align: center;
    margin-top: 15px;
}

.cap-forgot-link {
    color: #e4e4e4;
    text-decoration: none;
    font-size: 14px;
}

.cap-forgot-link:hover {
    color: #ff8630;
    text-decoration: underline;
}

.cap-hidden {
    display: none;
}

/* OAuth Section */
.cap-oauth-section {
    margin-top: 10px;
}

.cap-divider {
    text-align: center;
    margin: 10px 0;
    position: relative;
}

.cap-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #374563;
}

.cap-divider span {
    background: #3c5388 ;
    padding: 0 15px;
    color: #bebebe;
    font-size: 16px;
    position: relative;
    z-index: 1;
}

.cap-google-btn {
    width: 100%;
    padding: 12px 10px;
    background: white;
    color: #333;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cap-google-btn:hover {
    background: #f8f9fa;
    border-color: #cbd3da;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cap-google-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cap-google-icon {
    width: 18px;
    height: 18px;
    fill: #fff0f0;
    margin: 0px 4px -4px;
}
.cap-form-group {
    text-align: center;
}
/* Responsive Design */
@media (max-width: 480px) {
    .cap-auth-container {
        margin: 10px;
        padding: 15px;
    }
    
    .cap-form-section h3 {
        font-size: 20px;
    }
    
    .cap-form-group input[type="text"],
    .cap-form-group input[type="email"],
    .cap-form-group input[type="password"] {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Loading States */
.cap-loading {
    opacity: 0.6;
    pointer-events: none;
}

.cap-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #ff8630;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Accessibility */
.cap-form-group input:focus,
.cap-submit-btn:focus,
.cap-google-btn:focus {
    outline: 2px solid #ff8630;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cap-auth-container {
        border: 2px solid #000;
    }
    
    .cap-form-group input {
        border-width: 2px;
    }
    
    .cap-submit-btn,
    .cap-google-btn {
        border-width: 2px;
    }
}

/* Dark mode support - Enhanced for better cross-browser compatibility */
@media (prefers-color-scheme: dark) {
    .cap-auth-container {
        background: #3c5388  !important;
        color: #efefef;
        /* Force dark mode styles for better Safari compatibility */
        -webkit-appearance: none;
        appearance: none;
    }
    
    .cap-form-section h3 {
        color: #efefef;
    }
    
    .cap-form-group label {
        color: #efefef;
        text-align: left;
    }
    
    .cap-form-group input {
        background: #ffffff;
        border-color: #718096;
        color: #efefef;
    }
    
    .cap-form-group input:focus {
        border-color: #ff6216;
    }
    
    .cap-submit-btn {
        background: #ff6216;
    }
    
    .cap-submit-btn:hover {
        background: #ff5816;
    }
    
    .cap-google-btn {
        background: #4a5568;
        border-color: #718096;
        color: #efefef;
    }
    
    .cap-google-btn:hover {
        background: #3c5388 ;
    }
}

/* Additional Safari-specific fixes for dark mode */
@supports (-webkit-appearance: none) {
    @media (prefers-color-scheme: dark) {
        .cap-auth-container {
            background: #3c5388  !important;
            /* Safari-specific dark mode enforcement */
            -webkit-background-clip: padding-box;
            background-clip: padding-box;
        }
    }
}

/* Google OAuth redirect message */
.cap-google-redirect-message {
    background: #f0f9ff;
    border: 1px solid #3c5388 ;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.cap-message-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.cap-info-icon {
    width: 20px;
    height: 20px;
    fill: #e95e0e;
    flex-shrink: 0;
    margin-top: 2px;
}

.cap-google-redirect-message p {
    margin: 0;
    color: #5f5e5e;
    font-size: 14px;
    line-height: 1.5;
}