/**
 * Zufuk'x — Point of Sale Styles
 */

/* ── POS Layout ──────────────────────────────────────────────── */
.zfx-pos-wrap {
    display: flex;
    gap: 0;
    height: calc(100vh - 160px);
    min-height: 600px;
    overflow: hidden;
}

/* ── Left panel: services ──────────────────────────────────── */
.zfx-pos-left {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e5e7eb;
    overflow: hidden;
}

.zfx-pos-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.zfx-pos-search {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color .15s;
}
.zfx-pos-search:focus {
    border-color: #0ea5a0;
}

.zfx-pos-category-filter {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
}

.zfx-pos-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    padding: 14px 16px;
    overflow-y: auto;
    flex: 1;
}

/* ── Service card ──────────────────────────────────────────── */
.zfx-service-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 12px;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, transform .1s;
    text-align: center;
    user-select: none;
}
.zfx-service-card:hover {
    border-color: #0ea5a0;
    box-shadow: 0 2px 8px rgba(14,165,160,.12);
    transform: translateY(-1px);
}
.zfx-service-card.zfx-service-added {
    border-color: #0ea5a0;
    background: #f0fdfa;
}

.zfx-service-card-icon {
    font-size: 26px;
    margin-bottom: 6px;
    display: block;
    line-height: 1;
}

.zfx-service-card-name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px;
    line-height: 1.3;
}

.zfx-service-card-price {
    font-size: 13px;
    font-weight: 700;
    color: #0ea5a0;
    margin: 0;
}

.zfx-service-card-duration {
    font-size: 11px;
    color: #6b7280;
    margin: 3px 0 0;
}

/* ── Right panel: cart ─────────────────────────────────────── */
.zfx-pos-right {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    background: #f9fafb;
    overflow: hidden;
}

.zfx-pos-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.zfx-pos-cart-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

/* ── Customer row ──────────────────────────────────────────── */
.zfx-pos-customer-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.zfx-pos-customer-select {
    flex: 1;
    position: relative;
}

.zfx-pos-customer-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    box-sizing: border-box;
}
.zfx-pos-customer-input:focus {
    outline: none;
    border-color: #0ea5a0;
}

.zfx-pos-customer-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d1d5db;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.zfx-pos-customer-option {
    padding: 9px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background .1s;
}
.zfx-pos-customer-option:hover,
.zfx-pos-customer-option.highlighted {
    background: #f0fdfa;
    color: #0f766e;
}

.zfx-pos-customer-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: #d1fae5;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #065f46;
    white-space: nowrap;
}

.zfx-pos-customer-badge button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    color: #059669;
    font-size: 14px;
}

/* ── Cart items ────────────────────────────────────────────── */
.zfx-pos-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.zfx-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9ca3af;
    font-size: 14px;
    gap: 8px;
    padding: 20px;
}

.zfx-cart-empty .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
}

.zfx-cart-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
}
.zfx-cart-item:last-child {
    border-bottom: none;
}

.zfx-cart-item-info {
    flex: 1;
    min-width: 0;
}

.zfx-cart-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zfx-cart-item-meta {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
}

.zfx-cart-item-staff {
    margin-top: 4px;
}

.zfx-cart-item-staff select {
    font-size: 12px;
    padding: 2px 6px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    max-width: 150px;
}

.zfx-cart-item-hair {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}

.zfx-cart-item-hair select {
    font-size: 11px;
    padding: 2px 4px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    flex: 1;
}

.zfx-cart-item-price {
    font-size: 14px;
    font-weight: 700;
    color: #0ea5a0;
    white-space: nowrap;
    margin-top: 2px;
}

.zfx-cart-item-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 2px;
    line-height: 1;
    font-size: 18px;
    transition: color .1s;
}
.zfx-cart-item-remove:hover {
    color: #ef4444;
}

/* ── Cart totals ───────────────────────────────────────────── */
.zfx-pos-cart-totals {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 12px 14px;
    flex-shrink: 0;
}

.zfx-totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #374151;
    padding: 3px 0;
}

.zfx-totals-row.zfx-totals-discount {
    color: #16a34a;
}

.zfx-totals-row.zfx-totals-grand {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    border-top: 1px solid #e5e7eb;
    margin-top: 6px;
    padding-top: 8px;
}

.zfx-coupon-row {
    display: flex;
    gap: 6px;
    margin: 8px 0;
}

.zfx-coupon-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
}
.zfx-coupon-input:focus {
    outline: none;
    border-color: #0ea5a0;
}

.zfx-btn-apply-coupon {
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #0ea5a0;
    border-radius: 6px;
    color: #0ea5a0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.zfx-btn-apply-coupon:hover {
    background: #f0fdfa;
}

.zfx-discount-applied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 10px;
    background: #dcfce7;
    border-radius: 6px;
    font-size: 12px;
    color: #166534;
    margin: 6px 0;
}

.zfx-discount-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #16a34a;
    padding: 0;
    font-size: 16px;
    line-height: 1;
}

/* ── Payment section ───────────────────────────────────────── */
.zfx-pos-payment {
    background: #fff;
    border-top: 2px solid #0ea5a0;
    padding: 12px 14px;
    flex-shrink: 0;
}

.zfx-payment-methods {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.zfx-payment-method-btn {
    flex: 1;
    min-width: 70px;
    padding: 8px 6px;
    background: #f3f4f6;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    text-align: center;
    transition: border-color .15s, background .15s;
}
.zfx-payment-method-btn.active {
    border-color: #0ea5a0;
    background: #f0fdfa;
    color: #0f766e;
}
.zfx-payment-method-btn .dashicons {
    display: block;
    margin: 0 auto 3px;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.zfx-payment-cash-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
}

.zfx-payment-cash-row label {
    font-size: 12px;
    color: #374151;
    white-space: nowrap;
}

.zfx-cash-input {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    text-align: right;
}
.zfx-cash-input:focus {
    outline: none;
    border-color: #0ea5a0;
}

.zfx-change-display {
    padding: 8px 12px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    font-size: 13px;
    color: #92400e;
    text-align: center;
    margin-bottom: 10px;
}

.zfx-tip-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.zfx-tip-row label {
    font-size: 12px;
    color: #374151;
    white-space: nowrap;
}

.zfx-tip-input {
    width: 80px;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    text-align: right;
}

.zfx-tip-presets {
    display: flex;
    gap: 4px;
}

.zfx-tip-preset {
    padding: 4px 8px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: background .1s;
}
.zfx-tip-preset:hover,
.zfx-tip-preset.active {
    background: #d1fae5;
    border-color: #6ee7b7;
    color: #065f46;
}

.zfx-pos-action-row {
    display: flex;
    gap: 8px;
}

.zfx-btn-pos-discount {
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: border-color .15s;
    white-space: nowrap;
}
.zfx-btn-pos-discount:hover {
    border-color: #0ea5a0;
    color: #0ea5a0;
}

.zfx-btn-charge {
    flex: 1;
    padding: 12px;
    background: #0ea5a0;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.zfx-btn-charge:hover {
    background: #0c8f8a;
}
.zfx-btn-charge:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* ── Hair options modal prompt ─────────────────────────────── */
.zfx-hair-prompt {
    padding: 16px;
}

.zfx-hair-prompt h4 {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 700;
}

.zfx-hair-prompt-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.zfx-hair-option-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.zfx-hair-option-group select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
}

.zfx-hair-price-preview {
    padding: 10px;
    background: #f0fdfa;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #0ea5a0;
    margin-bottom: 14px;
}

/* ── Receipt modal ─────────────────────────────────────────── */
.zfx-receipt-wrap {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #111;
    max-width: 300px;
    margin: 0 auto;
    padding: 16px;
}

.zfx-receipt-header {
    text-align: center;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.zfx-receipt-salon-name {
    font-size: 16px;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.zfx-receipt-meta {
    font-size: 11px;
    color: #555;
}

.zfx-receipt-items {
    border-bottom: 1px dashed #ccc;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.zfx-receipt-item {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 2px 0;
}

.zfx-receipt-item-name {
    flex: 1;
}

.zfx-receipt-item-price {
    font-weight: 600;
    white-space: nowrap;
    margin-left: 10px;
}

.zfx-receipt-totals {
    border-bottom: 1px dashed #ccc;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.zfx-receipt-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 1px 0;
}

.zfx-receipt-total-row.grand {
    font-size: 15px;
    font-weight: 700;
    margin-top: 4px;
}

.zfx-receipt-footer {
    text-align: center;
    font-size: 11px;
    color: #555;
    margin-top: 10px;
}

.zfx-receipt-print-btn {
    display: block;
    width: 100%;
    margin: 12px 0 0;
    padding: 10px;
    background: #0ea5a0;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}
.zfx-receipt-print-btn:hover {
    background: #0c8f8a;
}

@media print {
    body > *:not(.zfx-receipt-wrap) { display: none !important; }
    .zfx-receipt-print-btn { display: none !important; }
    .zfx-receipt-wrap { margin: 0; padding: 0; max-width: none; }
}

/* ── Daily summary ─────────────────────────────────────────── */
.zfx-pos-summary-bar {
    display: flex;
    gap: 12px;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.zfx-pos-summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 14px;
    background: #f9fafb;
    border-radius: 8px;
    min-width: 80px;
}

.zfx-pos-summary-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #0ea5a0;
}

.zfx-pos-summary-stat-label {
    font-size: 10px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-top: 2px;
}

/* ── Payment info panel (Zelle handle, PayPal note, etc.) ──── */
.zfx-payment-info-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #134e4a;
}

.zfx-payment-info-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.zfx-payment-handle {
    font-weight: 700;
    font-size: 14px;
    color: #0f766e;
    letter-spacing: .02em;
}

/* ── Void badge ────────────────────────────────────────────── */
.zfx-void-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-left: 6px;
}

/* ── POS tab switcher ───────────────────────────────────────── */
.zfx-pos-tabs {
    display: flex;
    border-bottom: 1px solid var(--zfx-border, #e5e7eb);
    flex-shrink: 0;
}

.zfx-pos-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--zfx-text-secondary, #6b7280);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.zfx-pos-tab:hover {
    color: var(--zfx-text-primary, #111827);
}

.zfx-pos-tab.active {
    color: var(--zfx-primary, #6366f1);
    border-bottom-color: var(--zfx-primary, #6366f1);
}

.zfx-pos-tab-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

/* ── Qty buttons in cart ────────────────────────────────────── */
.zfx-qty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 1px solid var(--zfx-border, #e5e7eb);
    border-radius: 4px;
    background: var(--zfx-bg-card, #fff);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    color: var(--zfx-text-primary, #111827);
    padding: 0;
}

.zfx-qty-btn:hover {
    background: var(--zfx-primary, #6366f1);
    color: #fff;
    border-color: var(--zfx-primary, #6366f1);
}
