/* ==============================================
   AJAX LOGIN – COMPLETE STYLES (NO BOOTSTRAP)
   ============================================== */

/* Import Bootstrap Icons (optional) */
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css');

/* -------------------------------------------------
   Overlay (dark background)
   ------------------------------------------------- */
.ajaxlogin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
}

/* -------------------------------------------------
   Modal base – hidden, fixed, centered
   ------------------------------------------------- */
.ajaxlogin-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 1050;
    outline: 0;
    /* Fade transition */
    transition: opacity 0.15s linear;
}

.ajaxlogin-modal:not(.show) {
    opacity: 0;
    pointer-events: none;
}

.ajaxlogin-modal.show {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* Content centering */
.ajaxlogin-modal .modal-dialog {
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
    max-width: 500px;
    margin: 1.75rem auto;
    position: relative;
    width: auto;
    pointer-events: none;
}

/* -------------------------------------------------
   Main Modal Container
   (Background set to transparent to kill aliasing)
   ------------------------------------------------- */
.ajaxlogin-modal .modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: transparent; 
    border: none;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* -------------------------------------------------
   Modal Header
   ------------------------------------------------- */
.ajaxlogin-modal .modal-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background-color: #2c85c8;
    border: none;
    color: #ffffff;
    /* Defines the top rounded corners */
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

/* -------------------------------------------------
   Modal Body
   ------------------------------------------------- */
.ajaxlogin-modal .modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 30px;
    background-color: #ffffff;
    /* Defines the bottom rounded corners */
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

.ajaxlogin-modal .modal-title {
    font-weight: 600;
    margin-bottom: 0;
    line-height: 1.5;
}

.ajaxlogin-modal .btn-close {
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: 0;
    border-radius: 0.375rem;
    opacity: 0.5;
    width: 1em;
    height: 1em;
    cursor: pointer;
    filter: brightness(0) invert(1);
}

.ajaxlogin-modal .btn-close:hover {
    opacity: 0.75;
}

/* Modal Body */
.ajaxlogin-modal .modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 30px;
}

/* -------------------------------------------------
   Forms
   ------------------------------------------------- */
.ajaxlogin-modal .form-control {
    display: block;
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #eee;
    border-radius: 5px !important;
    transition: border-color 0.3s ease;
}

.ajaxlogin-modal .form-control:focus {
    border-color: #2c85c8;
    outline: 0;
    box-shadow: none;
}

/* Input Groups with icons */
.ajaxlogin-modal .input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.ajaxlogin-modal .input-group .form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.ajaxlogin-modal .input-group .input-group-text {
    display: flex;
    align-items: center;
    padding: 0;
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #666;
    text-align: center;
    white-space: nowrap;
    background: transparent;
    border: none;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
}

.ajaxlogin-modal .input-group .form-control {
    padding-right: 45px; /* space for the icon */
}

/* Main button */
.ajaxlogin-modal .btn-login {
    display: inline-block;
    padding: 12px 20px;
    background-color: #2c85c8; /* Cor sólida */
    border: none;
    border-radius: 5px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 15px;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    color: white;
}

.ajaxlogin-modal .btn-login:hover,
.ajaxlogin-modal .btn-login:focus,
.ajaxlogin-modal .btn-login:active {
    background-color: #1e5c8a; /* A little darker on hover */
    opacity: 1; /* Removed opacity 0.9 so click looks solid */
    color: white;
}

.ajaxlogin-modal .btn-login:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* Social buttons */
.ajaxlogin-modal .social-login {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 15px;
}

.ajaxlogin-modal .btn-social {
    flex: 1;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid #eee;
    background: #fbfbfb;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    outline: none;
    color: #666;
    text-decoration: none;
    cursor: pointer;
}

.ajaxlogin-modal .btn-social:hover,
.ajaxlogin-modal .btn-social:focus {
    border-color: #2c85c8 !important;
    background-color: #ffffff;
    color: #000;
    box-shadow: none;
}

.ajaxlogin-modal .btn-social:active {
    background-color: #f0f0f0;
    border-color: #2c85c8 !important;
}

.ajaxlogin-modal .btn-social:disabled {
    cursor: wait;
    opacity: 0.6;
}



/* Links */
.ajaxlogin-modal .text-decoration-none {
    color: #2c85c8;
    text-decoration: none;
}

.ajaxlogin-modal .text-decoration-none:hover {
    color: #1e5c8a;
    text-decoration: underline;
}

/* Checkbox and row */
.ajaxlogin-modal .form-check {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    background: transparent 
}

.ajaxlogin-modal .form-check-input {
    width: 1em;
    height: 1em;
    margin-right: 0.5em;
    vertical-align: middle;
}

.ajaxlogin-modal .form-check-label {
    margin-bottom: 0;
}

/* Progress indicator - Bootstrap white loader */
.ajaxlogin-modal .progress-indicator {
    text-align: center;
}

.ajaxlogin-modal .please-wait {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.ajaxlogin-modal .please-wait img {
    display: none; /* Hide the original GIF */
}

.ajaxlogin-modal .please-wait::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' fill=\'%23ffffff\' viewBox=\'0 0 16 16\'%3E%3Cpath d=\'M11.534 7h3.932a.25.25 0 0 1 .192.41l-1.966 2.36a.25.25 0 0 1-.384 0l-1.966-2.36a.25.25 0 0 1 .192-.41zm-11 2h3.932a.25.25 0 0 0 .192-.41L2.692 6.23a.25.25 0 0 0-.384 0L.342 8.59A.25.25 0 0 0 .534 9z\'/%3E%3Cpath fill-rule=\'evenodd\' d=\'M8 3c-1.552 0-2.94.707-3.857 1.818a.5.5 0 1 1-.771-.636A6.002 6.002 0 0 1 13.917 7H12.9A5.002 5.002 0 0 0 8 3zM3.1 9a5.002 5.002 0 0 0 8.757 2.182.5.5 0 1 1 .771.636A6.002 6.002 0 0 1 2.083 9H3.1z\'/%3E%3C/svg%3E');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: spin 0.8s linear infinite;
    margin-left: 5px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alerts */
.ajaxlogin-modal .alert {
    margin-bottom: 20px;
    padding: 0.75rem 1.25rem;
    border-radius: 5px;
    border: 1px solid transparent;
}

.ajaxlogin-modal .alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.ajaxlogin-modal .alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Validation */
.ajaxlogin-modal .validation-advice {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 5px;
    padding-left: 5px;
}

.ajaxlogin-modal .input-box .validation-advice {
    line-height: normal;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ajaxlogin-modal .modal-dialog {
        max-width: calc(100% - 20px);
        margin: 10px;
    }
    
    .ajaxlogin-modal .modal-body {
        padding: 20px;
    }
    
    .ajaxlogin-modal .social-login {
        flex-direction: column;
    }
}

/* -------------------------------------------------
   Custom scrollbar (global, optional)
   ------------------------------------------------- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgb(237, 237, 237);
    border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgb(220, 220, 220);
}

::-webkit-scrollbar-thumb:active {
    background: rgb(200, 200, 200);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgb(237, 237, 237) transparent;
}

/* -------------------------------------------------
   Persistent cart modal
   ------------------------------------------------- */
.ajaxlogin-modal#persistent-cart-window .modal-body {
    text-align: center;
}

.ajaxlogin-modal#persistent-cart-window .btn-close {
    position: absolute;
    right: 20px;
    top: 20px;
}

/* -------------------------------------------------
   Remove old styles (if any)
   ------------------------------------------------- */
.ajaxlogin-window {
    display: none;
}

/* -------------------------------------------------
   Bootstrap icon customization - Logout icon
   ------------------------------------------------- */

/* Hide the original Bootstrap icon */
.bi.bi-box-arrow-right {
    display: none;
}

.bi.bi-box-arrow-right:before {
    content: '';
}

/* Create the custom icon using the same class */
.bi.bi-box-arrow-right {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-image: url('data:image/svg+xml,%3Csvg width=\'24px\' height=\'24px\' viewBox=\'0 0 24 24\' fill=\'none\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cpath d=\'M18 8L22 12M22 12L18 16M22 12H9M15 4.20404C13.7252 3.43827 12.2452 3 10.6667 3C5.8802 3 2 7.02944 2 12C2 16.9706 5.8802 21 10.6667 21C12.2452 21 13.7252 20.5617 15 19.796\' stroke=\'%23000000\' stroke-width=\'2\' stroke-linecap=\'round\' stroke-linejoin=\'round\'%3E%3C/path%3E%3C/svg%3E');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: background-image 0.3s ease;
}

/* Hover effect - white version */
.bi.bi-box-arrow-right:hover {
    background-image: url('data:image/svg+xml,%3Csvg width=\'24px\' height=\'24px\' viewBox=\'0 0 24 24\' fill=\'none\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cpath d=\'M18 8L22 12M22 12L18 16M22 12H9M15 4.20404C13.7252 3.43827 12.2452 3 10.6667 3C5.8802 3 2 7.02944 2 12C2 16.9706 5.8802 21 10.6667 21C12.2452 21 13.7252 20.5617 15 19.796\' stroke=\'%23ffffff\' stroke-width=\'2\' stroke-linecap=\'round\' stroke-linejoin=\'round\'%3E%3C/path%3E%3C/svg%3E');
}

/* 2x size variant */
.bi.bi-box-arrow-right.ic-2x {
    width: 48px;
    height: 48px;
}

/* -------------------------------------------------
   Bootstrap icon customization - Facebook icon
   ------------------------------------------------- */
   

/* Hide the original Bootstrap font icon */
.bi.bi-facebook:before {
    content: '' !important;
    display: none !important;
}

/* Create the custom icon using your specific SVG */
.bi.bi-facebook {
    display: inline-block;
    width: 1.4rem;  /* Tamanho que você está usando no botão */
    height: 1.4rem;
    vertical-align: middle;
    margin-top: -2px; /* Ajust value as necessary */
    /* Using SVG with official color */ 
    background-image: url("data:image/svg+xml,%3Csvg width='10px' height='20px' viewBox='329 7239 10 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M335.821282,7259 L335.821282,7250 L338.553693,7250 L339,7246 L335.821282,7246 L335.821282,7244.052 C335.821282,7243.022 335.847593,7242 337.286884,7242 L338.744689,7242 L338.744689,7239.14 C338.744689,7239.097 337.492497,7239 336.225687,7239 C333.580004,7239 331.923407,7240.657 331.923407,7243.7 L331.923407,7246 L329,7246 L329,7250 L331.923407,7250 L331.923407,7259 L335.821282,7259 Z' fill='%231877F2'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: filter 0.3s ease, transform 0.2s ease;
}

/* Hover effect for the icon inside the social button */
.btn-social:hover .bi.bi-facebook {
    /* Opcional: escurece um pouco o azul ou aplica um leve brilho */
    filter: brightness(1.2);
    transform: scale(1.05);
}
   




/* -------------------------------------------------
   Floating Labels - Google style (fixed)
   ------------------------------------------------- */
.ajaxlogin-modal .floating-label-group {
    position: relative;
    margin-bottom: 20px;
    width: 100%;
}

/* Container for the input, label, and icon */
.ajaxlogin-modal .floating-label-group .input-group {
    position: relative;
    display: block;
    width: 100%;
}

/* Main input field styling */
.ajaxlogin-modal .floating-label-group .form-control {
    height: 42px;
    /* Extra padding on the right to accommodate the icon */
    margin-top: 10px;
    padding: 10px 40px 0 12px;
    border: 1px solid #eee;
    border-radius: 5px !important;
    width: 100%;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out;
    box-sizing: border-box;
    background-color: #fff;
}

/* Blue border on focus using #2c85c8 */
.ajaxlogin-modal .floating-label-group .form-control:focus {
    border-color: #2c85c8;
    outline: 0;
    box-shadow: none;
}

/* Initial state of the label (inside the field) */
.ajaxlogin-modal .floating-label-group label {
    position: absolute;
    pointer-events: none;
    left: 13px;
    top: 12px;
    transition: 0.2s ease all;
    color: #999;
    font-size: 14px;
    font-weight: normal;
    background: transparent;
    padding: 0 2px;
    z-index: 1;
    margin-bottom: 0;
}

/* Floating state: moves the label to the top border when focused or not empty */
.ajaxlogin-modal .floating-label-group .form-control:focus ~ label,
.ajaxlogin-modal .floating-label-group .form-control.has-value ~ label {
    top: -8px !important;
    left: 10px !important;
    font-size: 11px !important;
    color: #2c85c8 !important;
    background: white !important; /* Covers the border line */
    padding: 0 4px !important;
    z-index: 10 !important;
}

/* Icon positioning (Envelope/Eye) inside the group */
.ajaxlogin-modal .floating-label-group .input-group-text {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0;
    pointer-events: auto;
}

/* Ensure padding on the right so text doesn't overlap the icon */
.ajaxlogin-modal .floating-label-group .input-group .form-control {
    padding-right: 40px;
}

/* Highlights the icon color when the user clicks the field */
.ajaxlogin-modal .floating-label-group .input-group .form-control:focus ~ .input-group-text {
    color: #2c85c8;
}

/* Higher z-index for the floating label to ensure visibility over icons/borders */
.ajaxlogin-modal .floating-label-group .input-group .form-control:focus ~ label,
.ajaxlogin-modal .floating-label-group .input-group .form-control.has-value ~ label {
    background: white;
    z-index: 10;
}

/* ==============================================
   FLEXBOX LAYOUT FOR REGISTER FORM
   ============================================== */

.ajaxlogin-modal .flex-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.ajaxlogin-modal .flex-col {
    flex: 1 1 0;
    min-width: 0; /* Prevents overflow */
}

.ajaxlogin-modal .flex-col-full {
    flex: 0 0 100%;
}

/* Ensure floating labels take full width of their container */
.ajaxlogin-modal .flex-col .floating-label-group,
.ajaxlogin-modal .flex-col-full .floating-label-group {
    width: 100%;
}

/* Two columns main container */
.ajaxlogin-modal .flex-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.ajaxlogin-modal .flex-container > div {
    flex: 1;
    min-width: 300px;
}

/* Checkbox alignment */
.ajaxlogin-modal .checkbox-flex {
    display: flex;
    align-items: center;
    height: 100%;
    padding-top: 12px;
}

.ajaxlogin-modal .checkbox-flex input[type="checkbox"] {
    margin-right: 8px;
}

.ajaxlogin-modal .checkbox-flex label {
    margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ajaxlogin-modal .flex-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .ajaxlogin-modal .flex-col {
        flex: 0 0 100%;
    }
    
    .ajaxlogin-modal .flex-container {
        flex-direction: column;
        gap: 20px;
    }
}

/* ==============================================
   AJAX LOGIN – ICON COLORS AND SIZES
   ============================================== */

/* Icon base styles - matching label color */
.ajaxlogin-modal .floating-label-group .input-group-text i {
    font-size: 1.4rem;
    color: #999; /* Same color as the labels */
    transition: color 0.2s ease;
}

/* Icon color on hover (for clickable icons like eye) */
.ajaxlogin-modal .floating-label-group .input-group-text i.bi-eye:hover {
    color: #2c85c8; /* Blue on hover - same as label focus */
}

/* Icon color when field is focused */
.ajaxlogin-modal .floating-label-group .input-group .form-control:focus ~ .input-group-text i {
    color: #2c85c8; /* Blue when field is focused */
}

/* Specific adjustments for envelope icon */
.ajaxlogin-modal .floating-label-group .input-group-text i.bi-envelope-at {
    font-size: 1.4rem;
}

/* Specific adjustments for eye icon */
.ajaxlogin-modal .floating-label-group .input-group-text i.bi-eye {
    font-size: 1.4rem;
    cursor: pointer;
}

/* ==============================================
   AJAX LOGIN – DIVIDER (OR CONTINUE WITH)
   ============================================== */

.ajaxlogin-modal .divider {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 25px 0 !important;
    text-align: center !important;
    
    /* Force reset of generic Ultimo styles */
    clear: none !important;
    font-size: inherit !important;
    line-height: normal !important;
    height: auto !important;
    background: none !important;
    text-indent: 0 !important;
    overflow: visible !important;
}

.ajaxlogin-modal .divider::before,
.ajaxlogin-modal .divider::after {
    content: '' !important;
    flex: 1 !important;
    height: 0.5px !important;
    background: #ddd !important;
    margin: 0 !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
}

.ajaxlogin-modal .divider span {
    display: inline-block !important;
    padding: 0 20px !important;
    background: white !important;
    color: #666 !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
    text-indent: 0 !important;
    max-width: none !important;
    overflow: visible !important;
}

/* Small screen adjustment */
@media (max-width: 480px) {
    .ajaxlogin-modal .divider span {
        padding: 0 12px !important;
        font-size: 0.8rem !important;
        letter-spacing: 0.5px !important;
    }
}

/* ==============================================
   AJAX LOGIN – HIDE REQUIRED ASTERISK
   ============================================== */

/* Hide the red asterisk for required fields in the registration form */
.ajaxlogin-modal span.required {
    display: none !important;
}

/* If the asterisk is generated via pseudo-element, hide it as well */
.ajaxlogin-modal span.required::before,
.ajaxlogin-modal span.required::after {
    display: none !important;
    content: none !important;
}