/* ========================================
   VERIFICAR MODULE STYLES (simplified - common styles moved to common.css)
   ======================================== */

/* All common styles (verification-section, verification-card, responsive) 
   are now in common.css - this file only contains module-specific overrides */

/* Use page gradient and center card; override .options default bg */
#verificar-section {
    background: transparent !important;
    padding: 60px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
}

/* Make the whole card a single white container with header/body/footer */
#verificar-section .verification-card {
    background: #ffffff !important;
    border: 1px solid #d9e0e7 !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.12) !important;
    overflow: hidden;
    position: relative;
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
}

/* Remove accent stripe for a cleaner header */
#verificar-section .verification-card::before { display: none; }

#verificar-section .verification-card .card-header {
    background: #ffffff;
    padding: 28px 32px 10px;
    border-bottom: 1px solid #eef2f6;
    text-align: center;
}

#verificar-section .verification-card .card-title {
    color: var(--text-primary);
    margin: 0;
    font-weight: 700;
    font-size: 1.75rem;
    letter-spacing: -0.01em;
}

/* White container for the verificar card body (keeps transparent header shell) */
#verificar-section .verification-card .card-body {
    padding: 24px 32px 24px;
    background: #ffffff;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* Cleaner form groups (no boxed background); keep consistent gaps */
#verificar-section .verification-card .card-body .form-group {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 1rem;
}

#verificar-section .verification-card .card-footer {
    background: #ffffff;
    border-top: 1px solid #eef2f6;
    padding: 24px 32px; /* align with body horizontal padding */
}

/* Footer layout: full-width primary action */
#verificar-section .verification-card .card-footer .d-flex {
    justify-content: center !important;
    gap: 0 !important;
}
#verificar-section .verification-card .card-footer .btn {
    width: 100% !important; /* match input width */
    max-width: none !important;
    display: block !important;
    border-radius: 12px !important;
    padding: 14px 20px;
}

/* Wider card at medium/large screens to avoid over-compression */
@media (min-width: 768px) {
  #verificar-section .verification-card {
    max-width: 680px;
  }
}
@media (min-width: 992px) {
  #verificar-section .verification-card {
    max-width: 720px;
  }
}

/* Left-align form labels and groups inside the card body (override .options text-center) */
#verificar-section .verification-card .card-body,
#verificar-section .verification-card .card-body .form-group,
#verificar-section .verification-card .card-body .form-label,
#verificar-section .verification-card .card-body .captcha-section {
    text-align: left;
}

/* Stack action buttons on medium screens too (e.g., 1024x800) */
@media (max-width: 1100px) {
    #verificar-section .verification-card .card-footer .d-flex {
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        gap: 12px;
    }
    #verificar-section .verification-card .card-footer .btn {
        width: 100%;
    }
}

/* Valid state check using pseudo-element (prevents clipping in any browser) */
#verificar-section .form-control-lg.is-valid,
#verificar-section .form-control-lg:valid,
#verificar-section .was-validated .form-control-lg:valid {
    background-image: none !important; /* remove bootstrap bg to avoid crop */
    position: relative;
    overflow: visible !important;
    padding-right: 3rem !important; /* room for the icon */
}
#verificar-section .form-control-lg.is-valid::after,
#verificar-section .form-control-lg:valid::after,
#verificar-section .was-validated .form-control-lg:valid::after {
    content: '';
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.1rem;
    height: 1.1rem;
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 1.38 1.38 2.05-2.05.94.94-2.99 2.99z'/%3e%3c/svg%3e");
}

/* Selects: keep arrow as background; add check via pseudo-element */
#verificar-section .form-select.is-valid,
#verificar-section .form-select:valid,
#verificar-section .was-validated .form-select:valid {
    padding-right: 3rem !important; /* space for arrow + check */
    position: relative;
}
#verificar-section .form-select.is-valid::after,
#verificar-section .form-select:valid::after,
#verificar-section .was-validated .form-select:valid::after {
    content: '';
    position: absolute;
    right: 2.2rem; /* leave room for the arrow at the far right */
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 1.38 1.38 2.05-2.05.94.94-2.99 2.99z'/%3e%3c/svg%3e");
}

/* Captcha section */
.captcha-section {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 1.5rem;
    border: 2px solid var(--border-light);
}

.captcha-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
    font-size: 2rem;
    font-weight: bold;
}

/* Distorted captcha numbers */
.captcha-number {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    min-width: 60px;
    text-align: center;
    font-family: 'Courier New', monospace;
    transform: rotate(-15deg) skew(-12deg) scaleY(0.8);
    box-shadow: var(--shadow-sm);
    position: relative;
    font-weight: bold;
    letter-spacing: 3px;
    font-style: italic;
}

.captcha-number:nth-child(1) {
    transform: rotate(18deg) skew(15deg) scale(1.2, 0.7);
    background: linear-gradient(65deg, var(--primary-color), #4a5d32);
}

.captcha-number:nth-child(3) {
    transform: rotate(-22deg) skew(18deg) scale(0.8, 1.3);
    background: linear-gradient(-65deg, var(--primary-color), #6b7c4f);
}

/* Visual noise for captcha */
.captcha-number::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        35deg,
        transparent,
        transparent 1px,
        rgba(255,255,255,0.2) 1px,
        rgba(255,255,255,0.2) 2px,
        transparent 2px,
        transparent 3px,
        rgba(0,0,0,0.1) 3px,
        rgba(0,0,0,0.1) 4px
    );
    border-radius: 12px;
}

.captcha-number::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        -25deg,
        transparent,
        transparent 2px,
        rgba(255,255,255,0.05) 2px,
        rgba(255,255,255,0.05) 3px
    );
    border-radius: 12px;
}

.captcha-operator,
.captcha-equals {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 2.5rem;
}

/* Responsive adjustments for very small screens */
@media (max-width: 480px) {
    .options {
        min-height: 100vh; /* Keep full height */
        padding: 40px 0; /* Reduce padding but keep balanced */
    }

    /* Stack action buttons vertically inside verificar card footer */
    #verificar-section .verification-card .card-footer .d-flex {
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        gap: 10px;
    }
    #verificar-section .verification-card .card-footer .btn {
        width: 100%;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 767.98px) {
    .verification-card {
        margin: 1rem 0.5rem;
        border-radius: 16px;
    }
    
    .verification-card .card-header {
        padding: 1.5rem 1rem;
    }
    
    .verification-card .card-body {
        padding: 1.5rem 1rem;
    }
    
    .verification-card .card-footer {
        padding: 1.25rem 1rem;
    }
}

/* Medium screen adjustments (tablets) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .verification-card {
        margin: 1.5rem 1rem;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .verification-card .card-body {
        padding: 2rem 1.5rem;
    }
    
    .verification-card .card-footer {
        padding: 1.5rem;
    }
    
    .captcha-section {
        padding: 1.25rem;
    }
}
