/* =============================================================================
   Ultrahogar Facturación – Form Styles
   ============================================================================= */

.uhf-facturacion-container {
    max-width: 640px;
    margin: 0 auto;
}

.uhf-facturacion-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.uhf-facturacion-subtitle {
    font-size: 1rem;
    color: #555;
    margin-bottom: 32px;
}

/* =============================================================================
   Tabs
   ============================================================================= */

.uhf-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 28px;
    gap: 0;
}

.uhf-tabs__tab {
    flex: 1;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #666;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    text-align: center;
    margin-bottom: -2px;
}

button.uhf-tabs__tab~button.uhf-tabs__tab {
    margin-left: 1rem;
}

.uhf-tabs__tab:hover {
    color: #FFFFFF;
}

.uhf-tabs__tab--active {
    color: #0A1F51;
    border-bottom-color: #0A1F51;
}

.uhf-tabs__panel {
    display: none;
}

.uhf-tabs__panel--active {
    display: block;
}

.uhf-consulta-intro {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 20px;
}

/* =============================================================================
   Form
   ============================================================================= */

.uhf-form__group {
    margin-bottom: 20px;
}

.uhf-form__label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

.uhf-form__required {
    color: #e00;
    margin-left: 3px;
}

.uhf-form__input,
.uhf-form__select {
    display: block;
    width: 100%;
    padding: .1em .8em !important;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.uhf-form__input:focus,
.uhf-form__select:focus {
    outline: none;
    border-color: #e97c2b;
    box-shadow: 0 0 0 3px rgba(233, 124, 43, 0.2);
}

.uhf-form__input::placeholder {
    color: #aaa;
}

.uhf-form__select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23666' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 36px;
    cursor: pointer;
}

.uhf-form__group--turnstile {
    margin-bottom: 24px;
}

.uhf-turnstile-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.uhf-turnstile-widget {
    display: inline-block;
}

.uhf-turnstile-note {
    font-size: 0.78rem;
    color: #777;
    margin-top: 8px;
    max-width: 360px;
}

.uhf-form__group--submit {
    margin-top: 8px;
    display: flex;
    justify-content: end;
}

.uhf-form__submit {
    display: inline-block;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background-color: #0A1F51;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.uhf-form__submit:hover,
.uhf-form__submit:focus {
    background-color: #0464ac;
    outline: none;
}

.uhf-form__submit:disabled,
.uhf-form__submit[aria-disabled='true'] {
    background-color: #b9b9b9;
    color: #f3f3f3;
    cursor: not-allowed;
    opacity: 0.75;
}

.uhf-form__submit:disabled:hover,
.uhf-form__submit:disabled:focus,
.uhf-form__submit[aria-disabled='true']:hover,
.uhf-form__submit[aria-disabled='true']:focus {
    background-color: #b9b9b9;
    outline: none;
}

@media (max-width: 480px) {
    .uhf-facturacion-title {
        font-size: 1.5rem;
    }

    .uhf-form__submit {
        width: 100%;
        text-align: center;
    }
}

.uhf-form__error {
    display: block;
    font-size: 0.8rem;
    color: #e00;
    margin-top: 4px;
}

.uhf-form__status {
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 600;
}

.uhf-form__status--success {
    color: #1f7a1f;
}

.uhf-form__status--error {
    color: #b00020;
}

.uhf-input--error {
    border-color: #e00 !important;
    box-shadow: 0 0 0 3px rgba(220, 0, 0, 0.15) !important;
}

/* =============================================================================
   Invoice Results Table
   ============================================================================= */

.uhf-rfc-results {
    margin-top: 28px;
}

.uhf-invoices-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.uhf-invoices-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.uhf-invoices-table thead {
    background-color: #f5f5f5;
}

.uhf-invoices-table th {
    padding: 10px 12px;
    font-weight: 600;
    color: #333;
    text-align: left;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}

.uhf-invoices-table td {
    padding: 10px 12px;
    color: #444;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.uhf-invoices-table tbody tr:hover {
    background-color: #fdf6f0;
}

.uhf-invoice-link {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    background-color: #0A1F51;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.uhf-invoice-link:hover,
.uhf-invoice-link:focus {
    background-color: #0464ac;
    color: #fff;
    text-decoration: none;
}

/* Responsive card layout for small screens */
@media (max-width: 680px) {
    .uhf-invoices-table thead {
        display: none;
    }

    .uhf-invoices-table,
    .uhf-invoices-table tbody,
    .uhf-invoices-table tr,
    .uhf-invoices-table td {
        display: block;
    }

    .uhf-invoices-table tr {
        margin-bottom: 16px;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        padding: 12px;
        background: #fff;
    }

    .uhf-invoices-table td {
        padding: 6px 0;
        border-bottom: none;
        text-align: left;
    }

    .uhf-invoices-table td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        font-size: 0.78rem;
        color: #888;
        margin-bottom: 2px;
    }

    .uhf-invoices-table td:last-child {
        padding-bottom: 0;
    }
}