/* Estilos para el frontend de Listas de Consumo - Versión Final */

/* --- CONTENEDOR RAIZ --- */
.barfuss-lc-canje-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background: white;
    min-height: 100vh;
}

/* --- 1. HEADER CON LOGO --- */
.barfuss-lc-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 40px 20px 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-bottom: 3px solid #1a1a1a;
}

.barfuss-lc-header h2 {
    margin: 0;
    font-size: 0;
    height: 0;
    overflow: hidden;
}

.barfuss-lc-header h2::before {
    content: '';
    display: block;
    width: 100%;
    max-width: 350px;
    height: 100px;
    margin: 0 auto 20px;
    background-image: url('https://bdf.cervezabarfuss.com/wp-content/uploads/2024/12/Barfuss-Logo2024-RECTANG-negro-transp.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.barfuss-lc-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 400;
    color: #1a1a1a;
    letter-spacing: 0.5px;
}

/* --- 2. LOGIN --- */
.barfuss-lc-login {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.barfuss-lc-login > p {
    color: #2c2c2c;
    font-size: 15px;
    line-height: 1.5;
}

.barfuss-form-group {
    margin-bottom: 20px;
}

.barfuss-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 15px;
}

.barfuss-form-group input {
    width: 100%;
    padding: 14px;
    border: 2px solid #d0d0d0;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    background: white;
    color: #1a1a1a;
}

.barfuss-form-group input:focus {
    outline: none;
    border-color: #2c2c2c;
    box-shadow: 0 0 0 3px rgba(44,44,44,0.1);
}

/* --- 3. BOTONES --- */
.barfuss-btn {
    display: inline-block;
    padding: 14px 24px;
    font-size: 17px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.barfuss-btn-primary {
    background: #28a745;
    color: white;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.barfuss-btn-primary:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

.barfuss-btn-primary:active {
    transform: translateY(0);
}

.barfuss-btn-primary:disabled {
    background: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.barfuss-btn-link {
    background: none;
    border: none;
    color: #0073aa;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    font-size: 14px;
}

.barfuss-btn-link:hover {
    color: #005177;
}

/* --- 4. MENSAJES --- */
.barfuss-mensaje {
    padding: 16px;
    margin: 15px 0;
    border-radius: 6px;
    font-weight: 500;
}

.barfuss-error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
    font-weight: 600;
}

.barfuss-exito {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
    font-weight: 600;
}

.barfuss-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 2px solid #bee5eb;
    font-size: 14px;
}

/* --- 5. INFO DE LA LISTA --- */
.barfuss-lc-info {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #2c2c2c;
}

.info-cliente,
.info-evento {
    margin-right: 20px;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 500;
}

.info-cliente strong,
.info-evento strong {
    color: #1a1a1a;
}

/* --- 6. TABLA DE CONSUMOS --- */
.barfuss-consumos-wrapper {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.barfuss-consumos-wrapper h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1a1a1a;
    font-size: 22px;
    font-weight: 700;
}

.barfuss-tabla-consumos {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.barfuss-tabla-consumos thead {
    background: #2c2c2c;
}

.barfuss-tabla-consumos th {
    padding: 14px 12px;
    text-align: left;
    font-weight: 700;
    color: white;
    border-bottom: 3px solid #1a1a1a;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.barfuss-tabla-consumos td {
    padding: 16px 12px;
    border-bottom: 1px solid #e0e0e0;
    background: white;
}

.barfuss-tabla-consumos tr:last-child td {
    border-bottom: none;
}

.barfuss-tabla-consumos tr:hover td {
    background: #f8f8f8;
}

.cantidad-col {
    text-align: center;
}

.cantidad-badge {
    display: inline-block;
    background: #2c2c2c;
    color: white;
    padding: 8px 14px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 700;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.consumido-badge {
    background: #999;
    opacity: 0.6;
}

.producto-col strong {
    display: block;
    color: #1a1a1a;
    font-size: 17px;
    font-weight: 600;
}

.producto-consumido {
    color: #777;
    text-decoration: line-through;
    font-size: 17px;
}

.consumo-fecha {
    color: #28a745;
    font-size: 13px;
    margin-top: 4px;
    font-weight: 600;
}

.item-consumido {
    opacity: 0.5;
    background: #f5f5f5;
}

.canjear-col {
    text-align: center;
}

.check-consumido {
    font-size: 28px;
    color: #28a745;
    font-weight: bold;
}

/* --- 7. CHECKBOX PERSONALIZADO --- */
.barfuss-checkbox {
    display: inline-block;
    position: relative;
    cursor: pointer;
    user-select: none;
}

.barfuss-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    display: block;
    height: 36px;
    width: 36px;
    background-color: #e0e0e0;
    border: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.barfuss-checkbox:hover input ~ .checkmark {
    background-color: #d0d0d0;
    transform: scale(1.05);
}

.barfuss-checkbox input:checked ~ .checkmark {
    background-color: #28a745;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.barfuss-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.barfuss-checkbox .checkmark:after {
    left: 11px;
    top: 6px;
    width: 8px;
    height: 14px;
    border: solid white;
    border-width: 0 4px 4px 0;
    transform: rotate(45deg);
}

/* --- 8. INFORMACIÓN DE SELECCIÓN --- */
.barfuss-seleccion-info {
    background: #fff3cd;
    border: 2px solid #ffc107;
    padding: 14px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 15px;
    font-weight: 700;
    color: #856404;
    font-size: 16px;
}

#cantidad-seleccionados {
    color: #856404;
    font-size: 22px;
    font-weight: 800;
}

/* --- 9. ACCIONES --- */
.barfuss-acciones-consumo {
    text-align: center;
    padding-top: 10px;
}

.barfuss-vacio,
.barfuss-mensaje-final {
    text-align: center;
    padding: 40px 20px !important;
    color: #1a1a1a;
    font-size: 17px;
    font-weight: 500;
    background: #f8f9fa !important;
}

/* --- 10. RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
    .barfuss-lc-canje-container {
        padding: 15px;
    }
    
    .barfuss-lc-header {
        padding: 30px 15px 25px;
    }
    
    .barfuss-lc-header h2::before {
        max-width: 250px;
        height: 70px;
        margin-bottom: 15px;
    }
    
    .barfuss-lc-header h3 {
        font-size: 16px;
    }
    
    .barfuss-lc-login,
    .barfuss-consumos-wrapper {
        padding: 20px 15px;
    }
    
    .barfuss-lc-info {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 15px;
    }
    
    .info-cliente,
    .info-evento {
        margin-bottom: 8px;
        font-size: 14px;
    }
    
    .barfuss-tabla-consumos {
        font-size: 15px;
    }
    
    .barfuss-tabla-consumos th {
        padding: 12px 8px;
        font-size: 13px;
    }
    
    .barfuss-tabla-consumos td {
        padding: 14px 8px;
    }
    
    .producto-col strong,
    .producto-consumido {
        font-size: 16px;
    }
    
    .cantidad-badge {
        min-width: 36px;
        min-height: 36px;
        font-size: 15px;
        padding: 6px 12px;
    }
    
    .checkmark {
        height: 32px;
        width: 32px;
    }
    
    .barfuss-checkbox .checkmark:after {
        left: 9px;
        top: 4px;
        width: 7px;
        height: 13px;
        border-width: 0 3px 3px 0;
    }
    
    .barfuss-btn-primary {
        padding: 16px 24px;
        font-size: 18px;
    }
}