/* assets/css/pdv.css */

/* VARIÁVEIS CSS DINÂMICAS (Alteradas via JS) */
:root {
    --pdv-bg: #2d3436;
    --pdv-highlight: #f1c40f; /* Cor amarela padrão, será sobrescrita pelo JS */
    --pdv-text: #fff;
    --pdv-modal-bg: rgba(0,0,0,0.8);
}

/* Base */
#pdv-screen {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(135deg, var(--pdv-bg) 0%, #000 100%);
    z-index: 9999; display: none; flex-direction: column; font-family: 'Segoe UI', sans-serif;
}
#pdv-screen.active { display: flex; }

/* Header */
.pdv-header {
    background: var(--pdv-highlight);
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    color: #000;
    font-weight: bold;
}
.pdv-logo-area { width: 300px; font-size: 20px; text-transform: uppercase; }
.pdv-info-area { flex: 1; text-align: right; font-size: 16px; }

/* Body Layout */
.pdv-body { flex: 1; display: flex; padding: 20px; gap: 20px; height: calc(100vh - 120px); }

/* Esquerda: Cupom */
.pdv-cupom-wrapper {
    flex: 1;
    background: #fff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    overflow: hidden;
}
.cupom-header-table {
    background: #dfe6e9;
    padding: 10px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid #b2bec3;
    color: #2d3436;
}
.pdv-cupom-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    font-family: 'Consolas', monospace;
    font-size: 15px;
    background: #fdfdfd;
}
.cupom-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 5px;
    border-bottom: 1px dashed #dcdcdc;
}
.cupom-item:last-child { border-bottom: none; }

/* Direita: Controles */
.pdv-controls {
    width: 45%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pdv-display-msg {
    background: rgba(0,0,0,0.6);
    color: var(--pdv-highlight);
    font-size: 20px;
    text-align: center;
    padding: 8px;
    border-radius: 5px;
    font-weight: bold;
    border: 1px solid var(--pdv-highlight);
}

.pdv-product-box {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    gap: 15px;
    height: 180px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.pdv-img-box {
    width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    border-radius: 5px;
}
.pdv-img-box img { max-width: 100%; max-height: 100%; }

.pdv-info-produto {
    background: #f5f6fa;
    padding: 10px;
    border-radius: 5px;
    border-left: 5px solid var(--pdv-highlight);
    margin-bottom: 10px;
}
.pdv-info-produto div { font-size: 20px; font-weight: bold; color: #333; }

.pdv-info-box {
    background: #2d3436;
    color: #fff;
    text-align: center;
    padding: 5px;
    border-radius: 5px;
}
.pdv-info-box div { font-size: 24px; font-weight: bold; color: var(--pdv-highlight); }

/* Inputs */
.pdv-label { color: #fff; margin-bottom: 5px; font-weight: 600; letter-spacing: 1px; font-size: 12px; }
.pdv-input {
    border: none;
    padding: 15px;
    font-size: 20px;
    border-radius: 5px;
    font-weight: bold;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
}
.input-destaque {
    background: #fff;
    border: 3px solid var(--pdv-highlight);
}
.input-destaque:focus {
    background: #fffae6;
    outline: none;
    box-shadow: 0 0 10px var(--pdv-highlight);
}

/* Totalizadores */
.pdv-totais-row { display: flex; gap: 15px; margin-top: auto; }
.box-total {
    flex: 1;
    background: rgba(255,255,255,0.1);
    padding: 10px;
    border-radius: 5px;
    text-align: right;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}
.box-total .value { font-size: 30px; font-weight: bold; }

.box-total-geral {
    background: var(--pdv-highlight);
    color: #000;
    border: none;
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.4);
}
.box-total-geral .value { font-size: 40px; }

/* Footer */
.pdv-footer {
    height: 80px;
    background: #1e272e;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 20px;
    border-top: 1px solid #444;
}
.key-btn {
    background: #2d3436;
    border: 1px solid #444;
    color: #ccc;
    font-size: 12px;
    font-weight: bold;
    padding: 8px 15px;
    border-radius: 5px;
    min-width: 90px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}
.key-btn i { font-size: 18px; display: block; margin-bottom: 5px; color: var(--pdv-highlight); }
.key-btn:hover { background: #444; color: #fff; transform: translateY(-2px); border-color: var(--pdv-highlight); }
.key-btn:active { transform: translateY(0); }

/* Modais Customizados */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}
.modal-box {
    background: #fff;
    width: 500px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    animation: slideDown 0.3s ease;
}
@keyframes slideDown { from { transform: translateY(-50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header-custom {
    background: var(--pdv-highlight);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #000;
}
.modal-header-custom h3 { margin: 0; font-size: 20px; font-weight: bold; }
.btn-close-white { background: none; border: none; font-size: 24px; cursor: pointer; color: #000; opacity: 0.7; }
.btn-close-white:hover { opacity: 1; }