/* ============================================================
   TABLERO — CABECERA
   ============================================================ */

.board-header {
    background: #ffffff;
    padding: 12px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 14px;
}

.board-header label {
    font-weight: 600;
    color: #444;
    margin-bottom: 4px;
    font-size: 0.85rem;
}

.board-header input,
.board-header select {
    font-size: 0.85rem;
    padding: 6px 8px;
}

/* ============================================================
   ESTATUS CIERRE
   ============================================================ */

.estatus-cierre-wrapper {
    background: #ffffff;
    padding: 12px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.estatus-cierre-wrapper .form-check.form-switch {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding-left: 0 !important;
}

.estatus-cierre-wrapper .form-check-input {
    width: 1.6em !important;
    height: 0.9em !important;
    transform: scale(0.85) !important;
    margin-left: 0 !important;
    margin-right: 8px !important;
}

.estatus-cierre-wrapper .form-check-label {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #444 !important;
}

/* ============================================================
   BOTONES DEL TABLERO — BASE (CELULAR)
   ============================================================ */

.board-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.board-buttons .btn {
    width: 75%;
    font-size: 0.9rem;
    padding: 0.75rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
}

/* ============================================================
   BOTONES — MODO PC (>= 768px)
   ============================================================ */

@media (min-width: 768px) {

    .board-buttons {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 10px;
    }

    .board-buttons .btn {
        width: auto;
        white-space: nowrap;
        margin-bottom: 0;
    }
}

/* ============================================================
   TABLA NORMAL EN PC (NO TARJETAS)
   ============================================================ */

@media (min-width: 577px) {

    #listGiftgivers tr {
        display: table-row !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    #listGiftgivers td {
        display: table-cell !important;
        padding: 8px !important;
        vertical-align: middle !important;
    }

    #listGiftgivers td::before {
        content: "" !important;
    }

    #listGiftgivers td[data-label="Confirmación de Regalo"] {
        text-align: center !important;
    }
}

/* ============================================================
   SELECT2 — SOLO PARA LISTGIFTGIVERS
   ============================================================ */

#listGiftgivers .select2-container {
    flex: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
}

#listGiftgivers .select2-selection--single {
    height: 34px !important;
    display: flex !important;
    align-items: center !important;
}

#listGiftgivers .select2-selection__rendered {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 34px !important;
    padding-left: 8px !important;
    width: 100% !important;
}

#listGiftgivers .select2-selection__arrow {
    height: 34px !important;
}

.select2-selection {
    border-radius: 10px !important;
    border: 1px solid #d8d8d8 !important;
    background: #fafafa !important;
    transition: all 0.2s ease-in-out;
}

.select2-selection:hover {
    border-color: #bcbcbc !important;
}

/* ============================================================
   MODAL DEL TABLERO
   ============================================================ */

#modalSearchBoard .modal-body {
    padding: 0.75rem !important;
}

#modalSearchBoard .detalle-wrapper {
    padding: 0 !important;
}

#modalSearchBoard .table-responsive {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

#modalSearchBoard table {
    margin: 0 !important;
    width: 100% !important;
}

#modalSearchBoard input.form-control-sm {
    font-size: 0.75rem !important;
    padding: 0.25rem !important;
}

#modalSearchBoard table th,
#modalSearchBoard table td {
    font-size: 0.75rem !important;
    padding: 4px !important;
}

#modalSearchBoard .btn {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.5rem !important;
}

/* ============================================================
   TARJETAS SOLO EN CELULAR — CORRECCIÓN DE ASIMETRÍA
   ============================================================ */

@media (max-width: 576px) {

    table.table thead {
        display: none !important;
    }

    #listGiftgivers tr {
        display: block !important;
        margin: 12px !important;
        padding: 10px !important;
        border-radius: 16px !important;
        background: #ffffff !important;
        box-shadow: 0 4px 14px rgba(0,0,0,0.06) !important;
    }

    #listGiftgivers td {
        display: block !important;
        width: 100% !important;
        padding: 6px 0 !important;
        border: none !important;
    }

    #listGiftgivers td::before {
        content: none !important;
    }

    #listGiftgivers td[data-label]::after {
        content: attr(data-label) !important;
        display: block !important;
        font-weight: 600 !important;
        color: #555 !important;
        margin-bottom: 4px !important;
        font-size: 0.8rem !important;
    }

    #listGiftgivers td > input,
    #listGiftgivers td > select,
    #listGiftgivers td .select2-container {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
    }

    #listGiftgivers td .select2-selection__rendered {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
        line-height: 1.2rem !important;
        padding: 4px 8px !important;
    }

    #listGiftgivers td .select2-selection--single {
        height: auto !important;
        min-height: 34px !important;
        display: flex !important;
        align-items: center !important;
    }

    #listGiftgivers td[data-label="Confirmación de Regalo"] .form-check {
        width: auto !important;
    }
}

/* ============================================================
   ⭐ NUEVO: LISTADO-HEADER — BOTONES DEBAJO TAMBIÉN EN PC
   ============================================================ */

@media (min-width: 577px) {

    .listado-row > .col-9,
    .listado-row > .col-3 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .listado-btn-wrapper {
        display: flex !important;
        justify-content: center !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .btn-pdf,
    .btn-excel {
        width: 45% !important;
    }
}
