/**
 * VRR Reservas - Frontend Styles
 * Design moderno com Tailwind-inspired classes
 */

.vrr-booking-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.vrr-booking-section * {
    box-sizing: border-box;
}

/* Header */
.vrr-booking-header {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 16px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.vrr-booking-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #0f172a;
}

.vrr-price-start {
    font-size: 14px;
    color: #64748b;
}

/* Body Grid - coluna única (calendário em cima, form por baixo) */
.vrr-booking-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Calendar Nav */
.vrr-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.vrr-cal-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.vrr-cal-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #475569;
    line-height: 1;
    padding: 0;
}

.vrr-cal-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

/* Calendar Grid */
.vrr-calendar-grid table {
    width: 100%;
    border-collapse: collapse;
}

.vrr-calendar-grid th {
    padding: 8px 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #94a3b8;
    text-align: center;
}

.vrr-calendar-grid td {
    padding: 4px;
    text-align: center;
    vertical-align: top;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    transition: background 0.2s;
    cursor: default;
}

.vrr-cal-day {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
    border-radius: 50%;
    margin-top: 2px;
}

.vrr-cal-status {
    font-size: 9px;
    display: block;
    color: #94a3b8;
    line-height: 1.2;
    padding: 0 2px 4px;
}

/* Calendar States */
.vrr-weekend .vrr-cal-day {
    color: #94a3b8;
}

.vrr-weekend .vrr-cal-status {
    color: #f59e0b;
}

.vrr-blocked .vrr-cal-day {
    color: #94a3b8;
    text-decoration: line-through;
}

.vrr-blocked .vrr-cal-status {
    color: #ef4444;
}

.vrr-today .vrr-cal-day {
    background: #dc2626;
    color: #fff;
}

.vrr-available .vrr-cal-day {
    cursor: pointer;
}

.vrr-available .vrr-cal-day:hover {
    background: #fef2f2;
    color: #dc2626;
}

td.vrr-selected .vrr-cal-day {
    background: #dc2626;
    color: #fff;
}

td.vrr-selected {
    background: #fef2f2;
    border-color: #fecaca !important;
}

.vrr-cal-empty {
    background: #fafafa;
    border-color: #f1f5f9 !important;
}

/* Legend */
.vrr-calendar-legend {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.vrr-legend-item {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vrr-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.vrr-dot-available { background: #22c55e; }
.vrr-dot-weekend { background: #f59e0b; }
.vrr-dot-blocked { background: #ef4444; }

/* Form fields */
.vrr-field {
    margin-bottom: 16px;
}

.vrr-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.vrr-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .vrr-field-row {
        grid-template-columns: 1fr;
    }
}

.vrr-select,
.vrr-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    color: #1f2937;
    transition: all 0.2s;
    box-sizing: border-box;
}

.vrr-select:focus,
.vrr-input:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
    outline: none;
}

.vrr-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

/* Price Summary */
.vrr-price-summary {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
}

.vrr-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 14px;
    color: #475569;
}

.vrr-summary-total {
    display: flex;
    justify-content: space-between;
    padding: 8px 0 0;
    margin-top: 8px;
    border-top: 2px solid #e2e8f0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

/* Buttons */
.vrr-actions {
    margin-top: 16px;
}

.vrr-actions .button {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.2s;
    text-align: center;
}

.vrr-actions .button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Info footer */
.vrr-booking-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.vrr-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
}

.vrr-info-icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* Messages */
.vrr-message {
    padding: 12px 16px;
    border-radius: 10px;
    margin-top: 12px;
    font-size: 14px;
}

.vrr-message-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.vrr-message-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/**
 * PWA: Alerta de Disponibilidade
 */
.vrr-alert-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    text-align: center;
}

.vrr-alert-desc {
    font-size: 14px;
    color: #92400e;
    margin: 0 0 12px;
}

.vrr-alert-btn {
    background: #f59e0b;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.vrr-alert-btn:hover {
    background: #d97706;
}

.vrr-alert-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.vrr-alert-msg {
    margin-top: 12px;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
}

.vrr-alert-msg .vrr-success {
    color: #166534;
    background: #dcfce7;
    display: block;
    padding: 10px;
    border-radius: 8px;
}

.vrr-alert-msg .vrr-error {
    color: #991b1b;
    background: #fef2f2;
    display: block;
    padding: 10px;
    border-radius: 8px;
}

/**
 * PWA: Extensão de Reserva
 */
.vrr-extend-box {
    background: #fef2f2;
    border: 2px solid #fca5a5;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.vrr-extend-title {
    font-size: 18px;
    font-weight: 700;
    color: #991b1b;
    margin: 0 0 8px;
}

.vrr-extend-desc {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 16px;
}

.vrr-extend-field {
    margin-bottom: 16px;
}

.vrr-extend-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 6px;
}

.vrr-extend-datepicker {
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 15px;
    width: 100%;
    max-width: 280px;
    background: #fff;
}

.vrr-extend-summary {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.vrr-extend-summary p {
    margin: 4px 0;
    font-size: 15px;
    color: #0f172a;
}

.vrr-extend-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.vrr-extend-actions .button,
.vrr-extend-actions .button-primary {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.vrr-extend-msg {
    margin-top: 12px;
}

.vrr-extend-msg .vrr-success {
    color: #166534;
    background: #dcfce7;
    display: block;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
}

.vrr-extend-msg .vrr-error {
    color: #991b1b;
    background: #fef2f2;
    display: block;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
}

/** ==================== Form Rows & Stores ==================== */
.vrr-form-row { margin-bottom: 16px; }
.vrr-form-dates,
.vrr-form-stores {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 480px) {
    .vrr-form-dates,
    .vrr-form-stores { grid-template-columns:1fr; }
}

/* Deposit checkbox */
.vrr-deposit-options {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
}
.vrr-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
    cursor: pointer;
}
.vrr-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #dc2626;
}
.vrr-field-desc {
    font-size: 12px;
    color: #94a3b8;
    margin: 4px 0 0 26px;
}

/** ==================== Timer Bar ==================== */
.vrr-timer-bar {
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 20px;
}
.vrr-timer-active {
    background: linear-gradient(135deg, #fef2f2, #fff);
    border: 1px solid #fecaca;
}
.vrr-timer-wait {
    background: linear-gradient(135deg, #f0fdf4, #fff);
    border: 1px solid #bbf7d0;
}
.vrr-timer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.vrr-timer-label {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
}
.vrr-timer-count {
    font-size: 16px;
    font-weight: 700;
}
.vrr-timer-active .vrr-timer-count { color: #dc2626; }
.vrr-timer-wait .vrr-timer-count { color: #16a34a; }
.vrr-timer-progress {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}
.vrr-timer-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #dc2626, #ef4444);
    border-radius: 3px;
    transition: width 0.5s ease;
}
.vrr-timer-footer {
    font-size: 12px;
    color: #64748b;
}

/** ==================== SVG Icons ==================== */
.vrr-icon {
    display: inline-block;
    vertical-align: middle;
    margin-top: -2px;
    margin-right: 4px;
    flex-shrink: 0;
}

button .vrr-icon,
.vrr-pwa-install-btn .vrr-icon,
.vrr-pwa-link .vrr-icon,
.vrr-alert-btn .vrr-icon {
    margin-right: 6px;
}

.vrr-pwa-install-btn,
.vrr-pwa-link,
.vrr-alert-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.vrr-info-icon .vrr-icon {
    width: 20px;
    height: 20px;
}

.vrr-radio-content strong .vrr-icon {
    margin-right: 6px;
}

.vrr-extend-title .vrr-icon {
    margin-right: 8px;
}



/* =============================================
   STAND AUTO - DIFERENCIADOR VISUAL
   Produtos de venda (Stand Auto) 
   ============================================= */

/* Badge "VENDA" nos produtos do Stand Auto */
.product-cat-stand-auto .product-grid-item .product-element-top::after,
.product-cat-stand-auto .product-list-item .product-element-top::after,
.term-stand-auto .product-grid-item .product-element-top::after,
.term-stand-auto .product-list-item .product-element-top::after {
    content: "VENDA";
    position: absolute;
    top: 12px;
    left: 12px;
    background: #2563eb;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 2;
}

/* Badge "DESTAQUE STAND" para featured products */
.product-cat-stand-auto .product-grid-item.featured .product-element-top::before,
.term-stand-auto .product-grid-item.featured .product-element-top::before {
    content: "★ DESTAQUE";
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f59e0b;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 2;
}

/* Preço destacado */
.term-stand-auto .price,
.product-cat-stand-auto .price {
    color: #2563eb !important;
    font-weight: 700 !important;
}

/* Botão "VER DETALHES" em vez de "Adicionar ao carrinho" */
.term-stand-auto .add_to_cart_button,
.product-cat-stand-auto .add_to_cart_button {
    background: #2563eb !important;
    border-color: #2563eb !important;
}

.term-stand-auto .add_to_cart_button:hover,
.product-cat-stand-auto .add_to_cart_button:hover {
    background: #1d4ed8 !important;
}

/* Página do produto Stand Auto - esconder secção de reservas */
.product-cat-stand-auto .vrr-booking-section,
.term-stand-auto .vrr-booking-section {
    display: none !important;
}

/* Título da página Stand Auto */
.page-id-38447 .page-title {
    background: #1e3a5f !important;
}

.page-id-38447 .page-title h1 {
    color: #fff !important;
}

/* Menu item Stand Auto - destaque */
.menu-item-38448 > a {
    color: #2563eb !important;
    font-weight: 600 !important;
}

.menu-item-38448 > a::after {
    content: " ★";
    color: #f59e0b;
    font-size: 10px;
}

/* Cartão do produto Stand - borda azul */
.term-stand-auto .product-grid-item,
.product-cat-stand-auto .product-grid-item {
    border: 2px solid #dbeafe !important;
    border-radius: 12px !important;
    overflow: hidden;
    transition: all 0.3s ease !important;
}

.term-stand-auto .product-grid-item:hover,
.product-cat-stand-auto .product-grid-item:hover {
    border-color: #2563eb !important;
    box-shadow: 0 8px 25px rgba(37,99,235,0.15) !important;
}

/* Separador visual no menu */
.menu-item-38448::before {
    content: "|";
    color: #d1d5db;
    margin: 0 10px;
    font-weight: 300;
}
