@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* ============================================
   KITCHEN PANEL — COFFE MARKET
   Rediseño completo para legibilidad y estilo
   ============================================ */

* {
    font-family: 'Public Sans', sans-serif;
    box-sizing: border-box;
}

body {
    background-color: #F0F2F5;
    margin: 0;
}

/* ── Layout principal ── */
.wrapper .main_bottom {
    background-color: unset;
    padding: 8px;
}

#order_holder.order_holder {
    min-height: calc(100vh - 70px);
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    align-content: flex-start;
    gap: 12px;
    padding: 4px;
}

/* ── Tarjeta de pedido ── */
#order_holder.order_holder .single_order {
    width: calc(25% - 12px);
    min-width: 280px;
    border-radius: 16px;
    background: #fff;
    position: relative;
    height: auto;
    min-height: 320px;
    max-height: 420px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    display: flex;
    flex-direction: column;
}

#order_holder.order_holder .single_order:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* ── Header de la tarjeta ── */
#order_holder.order_holder .single_order .header_portion {
    padding: 14px 16px 12px 16px;
    color: #fff;
    border-radius: 16px 16px 0 0;
}

.light-blue-background {
    background: linear-gradient(135deg, #667eea 0%, #5176FF 100%);
}

.light-yellow-background {
    background: linear-gradient(135deg, #f6d365 0%, #F1B45E 100%) !important;
}

/* ── Fila superior: Mesa + Timer ── */
.header_portion .kitchen-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.header_portion .kitchen-table-info {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.9;
    line-height: 1.3;
}

.header_portion .kitchen-timer {
    font-size: 14px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 10px;
    border-radius: 20px;
    line-height: 1.4;
    white-space: nowrap;
}

/* ── Badge tipo de pedido ── */
.header_portion .kitchen-order-type-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 10px;
    border-radius: 12px;
    margin-bottom: 6px;
    line-height: 1.5;
}

/* ── Nombre del cliente ── */
.header_portion .kitchen-customer-name {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 2px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ── Mesero ── */
.header_portion .kitchen-waiter-name {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.85;
    line-height: 1.3;
    margin: 0 0 4px 0;
}

/* ── Número de pedido ── */
.header_portion .kitchen-sale-no {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.9;
    line-height: 1.3;
    margin: 0;
}

/* ── Sección de items ── */
#order_holder.order_holder .single_order .items_holder {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ── Seleccionar Todo ── */
.single_el_wrapper {
    border-bottom: 1px solid #f0f0f0;
}

.el_wrapper {
    display: flex;
    align-items: center;
    padding: 10px 14px;
}

.el_wrapper span {
    padding-left: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
}

/* ── Item individual ── */
#order_holder.order_holder .single_order .items_holder .single_item {
    padding: 10px 0;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.15s ease;
}

#order_holder.order_holder .single_order .items_holder .single_item:hover {
    background-color: #f8f9ff;
}

#order_holder.order_holder .single_order .items_holder .single_item:last-child {
    border-bottom: none;
}

.single_item_left_side {
    width: 62%;
    float: left;
}

.single_item_right_side {
    width: 38%;
    float: left;
    padding: 0 10px 0 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

#order_holder.order_holder .single_order .items_holder .single_item .item_quantity {
    width: 0%;
    text-align: center;
}

.floatleft.item_detail {
    padding: 0px 5px 0px 14px !important;
}

.item_detail p.item_name,
.item_detail .item_name {
    margin-bottom: 0 !important;
    margin-left: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.4;
}

.item_detail p.item_qty,
.item_qty {
    margin-bottom: 0 !important;
    padding-left: 20px;
    font-size: 12px;
    color: #555;
    line-height: 1.4;
}

#order_holder.order_holder .single_order .items_holder .single_item .item_detail p.modifiers {
    color: #7c8db0;
    font-size: 12px;
    line-height: 1.4;
    padding-left: 20px;
}

#order_holder.order_holder .single_order .items_holder .single_item .item_detail p.note {
    color: #e74c3c;
    font-size: 12px;
    line-height: 1.4;
    padding-left: 20px;
}

/* ── Estados de cocción (badges) ── */
.single_item_cooking_status {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
    white-space: nowrap;
    /* Default: No Listo */
    background-color: #fee2e2;
    color: #dc2626;
}

.single_item_cooking_status.start_cooking_button {
    background-color: #fef3c7;
    color: #d97706;
}

.single_item_cooking_status.done_cooking {
    background-color: #dcfce7;
    color: #16a34a;
}

/* ── Botones Cocinar / Listo ── */
.single_order_button_holder {
    background: #f8f9fa;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 14px;
    border-top: 1px solid #eee;
    position: relative;
    width: 100%;
    bottom: 0;
    left: 0;
}

.single_order_button_holder button {
    border: none;
    box-shadow: none;
    border-radius: 24px;
    padding: 8px 22px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.4;
    flex: 1;
    max-width: 140px;
}

.start_cooking_button {
    background-color: #F59E0B !important;
    color: white !important;
}

.start_cooking_button:hover {
    background-color: #D97706 !important;
    transform: scale(1.03);
}

.done_cooking {
    background-color: #22C55E;
    color: white !important;
}

.done_cooking:hover {
    background-color: #16A34A;
    transform: scale(1.03);
}

/* ── Separador entre items ── */
hr.hr_kitchen_panel {
    margin: 0;
    border: none;
    border-top: 1px solid #f0f0f0;
}

/* ── Header principal (barra superior) ── */
.wrapper .main_top .top_header h1 {
    color: white;
    font-size: 22px;
    font-weight: 600;
    line-height: 50px;
}

#main_kitchen_header {
    padding: 0 10px;
}

.bg-blue-btn, .bg-red-btn {
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.bg-blue-btn:hover {
    background: rgba(255,255,255,0.15) !important;
}

/* ── Select2 (idioma) ── */
.select2-container--default .select2-selection--single {
    background-color: transparent !important;
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: white;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #ffffff transparent transparent transparent;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #ffffff transparent;
}

/* ── Notificaciones ── */
.single_row_notification .bg-blue-btn,
#notification_list_modal .modal-footer .bg-blue-btn,
#help_modal .modal-footer .bg-blue-btn {
    color: white;
    border: none;
}

.single_row_notification {
    position: relative;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

/* ── Ocultamos clases legacy que ya no usamos ── */
.order_number.table_no,
.order_number.customer_name,
.order_number.sale_no,
p.order_duration {
    display: none;
}

/* ── Dark blue override ── */
.dark-blue-background {
    background-color: transparent !important;
}

/* ── Scrollbar del body ── */
body::-webkit-scrollbar {
    width: 8px;
}

body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

body::-webkit-scrollbar-thumb {
    background-color: #c1c1c1;
    border-radius: 4px;
}

body::-webkit-scrollbar-thumb:hover {
    background-color: #a1a1a1;
}

/* ── Items holder scrollbar ── */
.items_holder::-webkit-scrollbar {
    width: 4px;
}

.items_holder::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 4px;
}

/* ── Responsive ── */
@media only screen and (max-width: 1200px) {
    #order_holder.order_holder .single_order {
        width: calc(33.33% - 12px);
    }
}

@media only screen and (max-width: 900px) {
    #order_holder.order_holder .single_order {
        width: calc(50% - 12px);
    }
}

@media only screen and (max-width: 600px) {
    #order_holder.order_holder .single_order {
        width: 100%;
    }
}