/* =========================================================
   WC Facturas Cliente – Estilos front-end
   ========================================================= */

/* Wrapper general */
.wcfc-invoices-wrapper {
    margin-top: 1em;
}

.wcfc-title {
    font-size: 1.4em;
    margin-bottom: .75em;
}

/* Aviso cuando no hay facturas */
.wcfc-notice {
    margin-top: 1em;
}

/* Contador de facturas */
.wcfc-count {
    color: #555;
    font-size: .9em;
    margin-bottom: 1em;
}

/* Tabla responsive */
.wcfc-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.wcfc-invoices-table {
    width: 100%;
    border-collapse: collapse;
}

.wcfc-invoices-table thead th {
    background-color: #f7f7f7;
    border-bottom: 2px solid #e0e0e0;
    padding: .75em 1em;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.wcfc-invoices-table tbody tr {
    border-bottom: 1px solid #ebebeb;
    transition: background-color .15s ease;
}

.wcfc-invoices-table tbody tr:last-child {
    border-bottom: none;
}

.wcfc-invoices-table tbody tr:hover {
    background-color: #fafafa;
}

.wcfc-invoices-table td {
    padding: .75em 1em;
    vertical-align: middle;
}

/* Columnas */
.wcfc-col-number {
    font-weight: 600;
    min-width: 130px;
}

.wcfc-col-date {
    min-width: 110px;
    color: #555;
}

.wcfc-col-action {
    min-width: 100px;
    text-align: center;
}

/* Botón de descarga */
.wcfc-btn-download {
    display: inline-flex;
    align-items: center;
    gap: .35em;
    padding: .45em .9em !important;
    font-size: .85em !important;
    font-weight: 600;
    border-radius: 3px;
    text-decoration: none;
    white-space: nowrap;
}

.wcfc-icon-download {
    font-size: 1.1em;
    line-height: 1;
}

/* ── Paginación ─────────────────────────────── */
.wcfc-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4em;
    margin-top: 1.4em;
}

.wcfc-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 .7em;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: .9em;
    line-height: 1;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: background-color .15s ease, border-color .15s ease;
    cursor: pointer;
}

.wcfc-page-btn:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

.wcfc-page-btn.wcfc-page-current {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
    font-weight: 600;
    cursor: default;
    pointer-events: none;
}

.wcfc-page-btn.wcfc-disabled {
    opacity: .4;
    cursor: default;
    pointer-events: none;
}

.wcfc-page-prev,
.wcfc-page-next {
    min-width: auto;
    padding: 0 .9em;
}

/* ── Responsive (móvil) ─────────────────────── */
@media ( max-width: 600px ) {

    .wcfc-invoices-table,
    .wcfc-invoices-table thead,
    .wcfc-invoices-table tbody,
    .wcfc-invoices-table th,
    .wcfc-invoices-table td,
    .wcfc-invoices-table tr {
        display: block;
    }

    .wcfc-invoices-table thead {
        display: none; /* se muestra mediante data-title */
    }

    .wcfc-invoices-table tbody tr {
        margin-bottom: 1em;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        padding: .5em;
    }

    .wcfc-invoices-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: .5em .75em;
        border: none;
        border-bottom: 1px solid #f0f0f0;
    }

    .wcfc-invoices-table td:last-child {
        border-bottom: none;
    }

    .wcfc-invoices-table td::before {
        content: attr(data-title) ": ";
        font-weight: 600;
        margin-right: 1em;
        min-width: 100px;
    }

    .wcfc-col-action {
        text-align: right;
    }
}
