/* ============================================
   CUSTOMER AUTH MODAL - Login/Register
   Bolivia Import Manager
   ============================================ */

/* Base Modal */
.bim-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.bim-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: bimFadeIn 0.3s ease;
}

.bim-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: bimSlideUp 0.3s ease;
    z-index: 1;
}

.bim-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 2;
}

.bim-modal-close:hover {
    color: #333;
}

/* Auth Modal Specific */
.bim-modal-content.bim-auth-modal {
    max-width: 440px;
    padding: 0;
    margin-bottom: 0;
    overflow-y: auto;
    border-radius: 20px;
    box-sizing: border-box;
}

.bim-auth-modal-header {
    text-align: center;
    padding: 36px 32px 16px;
}

.bim-auth-modal-header h2 {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 8px;
    color: var(--bim-dark);
}

.bim-auth-modal-header p {
    color: var(--bim-secondary);
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Auth Tabs */
.bim-auth-tabs {
    display: flex;
    justify-content: center;
    border-bottom: 2px solid var(--bim-border);
    padding: 0 32px;
    gap: 0;
}

.bim-auth-tab {
    flex: none;
    background: transparent;
    border: none;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    color: var(--bim-secondary);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.bim-auth-tab:hover {
    color: var(--bim-dark);
}

.bim-auth-tab.active {
    color: var(--bim-primary);
    border-bottom-color: var(--bim-primary);
}

.bim-auth-tabs-content {
    padding: 24px 32px 8px;
}

.bim-auth-tab-pane {
    display: none;
}

.bim-auth-tab-pane.active {
    display: block;
    animation: bimFadeIn 0.3s ease;
}

/* Auth Form Groups */
.bim-modal-content.bim-auth-modal .bim-form-group {
    margin-bottom: 18px;
}

.bim-modal-content.bim-auth-modal .bim-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 12px;
    color: var(--bim-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Label Row with Forgot Link */
.bim-auth-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bim-auth-label-row label {
    margin-bottom: 0 !important;
}

.bim-auth-forgot {
    font-size: 12px;
    font-weight: 500;
    color: var(--bim-primary);
    text-decoration: none;
}

.bim-auth-forgot:hover {
    text-decoration: underline;
}

/* Auth Input with Icon */
.bim-auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.bim-auth-input-icon {
    position: absolute;
    left: 14px;
    z-index: 1;
    color: #94a3b8;
    display: flex;
    align-items: center;
}

.bim-auth-input-icon .material-symbols-outlined {
    font-size: 20px;
}

.bim-modal-content.bim-auth-modal .bim-auth-input {
    padding-left: 44px;
    padding-right: 14px;
    padding-top: 12px;
    padding-bottom: 12px;
    border: 1px solid var(--bim-border);
    border-radius: 12px;
    background: #f8fafc;
    font-size: 14px;
    font-weight: 500;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.bim-modal-content.bim-auth-modal .bim-auth-input:focus {
    border-color: var(--bim-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* Toggle Password Button */
.bim-auth-toggle-pw {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.bim-auth-toggle-pw:hover {
    color: var(--bim-dark);
}

.bim-auth-toggle-pw .material-symbols-outlined {
    font-size: 20px;
}

/* Password Input Padding */
input[type="password"].bim-auth-input,
input.bim-auth-input[data-pw-visible] {
    padding-right: 44px;
}

/* Auth Checkbox */
.bim-auth-checkbox {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-transform: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    color: var(--bim-dark) !important;
}

.bim-auth-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid var(--bim-border);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.bim-auth-checkbox input[type="checkbox"]:checked {
    background: var(--bim-primary);
    border-color: var(--bim-primary);
}

/* Auth Error */
.bim-auth-error {
    background: var(--bim-danger-light);
    color: var(--bim-danger);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
}

/* Auth Divider */
.bim-auth-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.bim-auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--bim-border);
}

.bim-auth-divider span {
    position: relative;
    background: #fff;
    padding: 0 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--bim-secondary);
}

/* Auth Footer */
.bim-auth-footer {
    text-align: center;
    padding: 0 0 16px;
}

.bim-auth-footer small {
    font-size: 12px;
    color: var(--bim-secondary);
    line-height: 1.5;
}

.bim-auth-footer a {
    color: var(--bim-primary);
    text-decoration: none;
    font-weight: 600;
}

.bim-auth-footer a:hover {
    text-decoration: underline;
}

/* Bottom Gradient Accent Bar */
.bim-auth-modal-accent {
    height: 6px;
    background: linear-gradient(90deg, var(--bim-gradient-start), var(--bim-gradient-end));
}

/* Auth Modal Responsive */
@media (max-width: 480px) {
    .bim-auth-modal {
        max-width: 100%;
        border-radius: 16px;
    }

    .bim-auth-tabs {
        padding: 0 20px;
    }

    .bim-auth-tabs-content {
        padding: 20px 20px 8px;
    }

    .bim-auth-modal-header {
        padding: 28px 20px 12px;
    }

    .bim-auth-modal-header h2 {
        font-size: 22px;
    }
}
