/* Estilos modernos e compactos para o Calendário WooCommerce Bookings */

:root {
    --cal-bg: transparent;
    --cal-text: #1e293b;
    --cal-muted: #94a3b8;
    --cal-accent: #2563eb; /* Azul moderno, pode ser ajustado */
    --cal-radius: 12px;
}

/* Container do Datepicker - Ultra Clean */
.wc-bookings-date-picker .ui-datepicker {
    width: 100% !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    font-family: inherit !important;
}

/* Header (Mês/Ano) */
.wc-bookings-date-picker .ui-datepicker-header {
    background: transparent !important;
    border: none !important;
    padding: 10px 0 20px 0 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wc-bookings-date-picker .ui-datepicker-title {
    color: var(--cal-text) !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.5px;
    order: 2;
    margin: 0 !important;
    text-transform: capitalize;
}

/* Setas de Navegação - Minimalistas */
.wc-bookings-date-picker .ui-datepicker-prev,
.wc-bookings-date-picker .ui-datepicker-next {
    position: static !important;
    cursor: pointer !important;
    width: 32px !important;
    height: 32px !important;
    background: transparent !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    transition: all 0.2s !important;
}

.wc-bookings-date-picker .ui-datepicker-prev:hover,
.wc-bookings-date-picker .ui-datepicker-next:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: var(--cal-text) !important;
}

.wc-bookings-date-picker .ui-datepicker-prev span,
.wc-bookings-date-picker .ui-datepicker-next span {
    display: none !important; /* Hide default text */
}

/* Inject icons via CSS */
.wc-bookings-date-picker .ui-datepicker-prev::after {
    content: "←";
    font-size: 1.2rem;
    color: var(--cal-text);
    line-height: 1;
}
.wc-bookings-date-picker .ui-datepicker-next::after {
    content: "→";
    font-size: 1.2rem;
    color: var(--cal-text);
    line-height: 1;
}

/* Tabela do Calendário */
.wc-bookings-date-picker .ui-datepicker-calendar {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    margin: 0 !important;
}

.wc-bookings-date-picker th {
    color: var(--cal-muted);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    padding-bottom: 12px !important;
    text-align: center !important;
}

/* Células de Dias */
.wc-bookings-date-picker td {
    padding: 0 !important;
}

.wc-bookings-date-picker td a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px !important;
    height: 44px !important;
    margin: 6px !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 35% !important; /* Circular for modern look */
    text-align: center !important;
    color: var(--cal-text) !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    transition: all 0.2s ease;
}

/* Hover no dia disponível */
.wc-bookings-date-picker td.bookable a {
    background: #f1f5f9 !important;
}

.wc-bookings-date-picker td.bookable a:hover {
    background: var(--cal-accent) !important;
    color: #ffffff !important;
    transform: scale(1.1);
}

/* Dia Selecionado */
.wc-bookings-date-picker td.ui-datepicker-current-day a,
.wc-bookings-date-picker td.ui-state-active {
    background: var(--cal-accent) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2) !important;
    font-weight: 700 !important;
}

/* Dias Indisponíveis */
.wc-bookings-date-picker td.ui-datepicker-unselectable span,
.wc-bookings-date-picker td.ui-state-disabled span {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 36px !important;
    height: 36px !important;
    margin: 0 auto !important;
    color: #e2e8f0 !important;
    font-size: 0.9rem !important;
}

/* =========================================
   Lógica de Passos (Calendário -> Formulário)
   ========================================= */
/* Lógica de Passos movida para single-product.php para evitar conflitos */

/* Botão Voltar */
#tourly-back-to-calendar, #tourly-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 8px 15px;
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: #f5f5f5;
    border-radius: 20px;
}
#tourly-back-to-calendar:hover, #tourly-back-btn:hover {
    background: #eee;
}

/* Campos de Pessoas - Compacto */
.wc-bookings-booking-form .form-field {
    margin-bottom: 12px;
    background: transparent; /* Remove background box */
    padding: 0; /* Remove padding */
    border-radius: 0;
}

.wc-bookings-booking-form label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: var(--cal-text);
    font-size: 0.9rem; /* Slightly smaller */
}

.wc-bookings-booking-form input[type="number"],
.wc-bookings-booking-form input[type="text"],
.wc-bookings-booking-form select,
.wc-bookings-booking-form textarea {
    width: 100%;
    padding: 8px 12px; /* Reduced padding */
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    text-align: left; /* Standard align */
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--cal-text);
    transition: border-color 0.2s;
    background: #fff;
}

.wc-bookings-booking-form input[type="number"] {
    text-align: center;
}

.wc-bookings-booking-form input:focus,
.wc-bookings-booking-form select:focus,
.wc-bookings-booking-form textarea:focus {
    border-color: var(--cal-accent);
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* Preço Total - Compacto */
.wc-bookings-booking-cost {
    margin: 16px 0;
    padding: 12px;
    background: #f8fafc; /* Lighter bg */
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    color: #0f172a;
    font-size: 1.1rem;
}

/* --- Block Picker (Horários) Grid Layout - Compacto --- */
.wc-bookings-booking-form .block-picker {
    list-style: none !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
}

/* Desktop: Flow layout or Grid */
.wc-bookings-booking-form .block-picker li {
    display: inline-block;
    margin: 0 6px 6px 0;
    width: auto;
}

.wc-bookings-booking-form .block-picker li a {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    color: #333 !important;
    border-radius: 6px !important;
    text-shadow: none !important;
    font-weight: 500 !important;
    padding: 8px 12px !important; /* Smaller padding */
    display: block !important;
    text-align: center;
    min-width: 64px;
    font-size: 0.9rem;
    text-decoration: none !important;
}

.wc-bookings-booking-form .block-picker li a:hover,
.wc-bookings-booking-form .block-picker li a.selected {
    background: var(--cal-accent) !important;
    color: #fff !important;
    border-color: var(--cal-accent) !important;
}

/* Mobile: Date and Time Side-by-Side (Grid Layout for Time Slots) */
@media (max-width: 768px) {
    /* Make Time Slots (Horario) Side-by-Side in a Grid */
    .wc-bookings-booking-form .block-picker {
        display: grid !important;
        grid-template-columns: 1fr 1fr; /* Two columns: side by side */
        gap: 8px; /* Reduced gap */
    }
    .wc-bookings-booking-form .block-picker li {
        display: block !important;
        margin: 0 !important;
        width: auto !important;
    }
    .wc-bookings-booking-form .block-picker li a {
        width: 100% !important;
        padding: 10px 4px !important; /* Slightly reduced */
        font-size: 0.9rem !important;
    }
}

/* Header Vendor Actions Alignment */
.sf-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tourly-cart-link {
    margin-left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ================================================================
   NOTIFICAÇÕES WOOCOMMERCE PREMIUM (TOAST STYLE)
   ================================================================ */

/* Wrapper geral */
.tourly-notices-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Reset de estilos padrão do WooCommerce */
.woocommerce-message, 
.woocommerce-error, 
.woocommerce-info {
    position: relative;
    padding: 16px 20px 16px 50px !important; /* Espaço extra na esquerda para ícone */
    margin: 0 !important;
    background: #ffffff !important;
    border: none !important; /* Remove borda superior padrão */
    border-left: 4px solid #ccc !important; /* Borda lateral colorida */
    border-radius: 12px !important;
    box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.08) !important;
    color: #334155 !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
}

/* Ícones via Pseudo-elementos */
.woocommerce-message::before, 
.woocommerce-error::before, 
.woocommerce-info::before {
    content: '' !important;
    position: absolute !important;
    left: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-size: 1.2rem !important;
}

/* --- SUCESSO (Green) --- */
.woocommerce-message {
    border-left-color: #10b981 !important; /* Verde Esmeralda */
}
.woocommerce-message::before {
    content: '\f00c' !important; /* Check icon */
    color: #10b981 !important;
}

/* --- ERRO (Red) --- */
.woocommerce-error {
    border-left-color: #ef4444 !important; /* Vermelho */
    list-style: none !important; /* Remove bolinhas de lista */
}
.woocommerce-error::before {
    content: '\f071' !important; /* Warning icon */
    color: #ef4444 !important;
}
.woocommerce-error li {
    margin: 0 !important;
    padding: 0 !important;
}

/* --- INFO (Blue) --- */
.woocommerce-info {
    border-left-color: #3b82f6 !important; /* Azul */
}
.woocommerce-info::before {
    content: '\f05a' !important; /* Info icon */
    color: #3b82f6 !important;
}

/* Botões dentro das notificações (ex: "Ver Carrinho") */
.woocommerce-message .button,
.woocommerce-error .button,
.woocommerce-info .button {
    float: none !important;
    margin-left: auto !important;
    background-color: var(--accent, #333) !important; /* Usa cor da loja se disponível */
    color: #fff !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.2s !important;
    text-decoration: none !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.woocommerce-message .button:hover,
.woocommerce-error .button:hover,
.woocommerce-info .button:hover {
    filter: brightness(110%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
}

/* Responsividade Mobile */
@media (max-width: 600px) {
    .woocommerce-message, 
    .woocommerce-error, 
    .woocommerce-info {
        padding: 15px 15px 15px 45px !important;
        font-size: 0.9rem !important;
        align-items: flex-start !important;
        flex-direction: column !important;
    }
    
    .woocommerce-message::before, 
    .woocommerce-error::before, 
    .woocommerce-info::before {
        left: 15px !important;
        top: 25px !important; /* Ajuste para alinhar com o texto no topo */
        transform: none !important;
    }

    .woocommerce-message .button,
    .woocommerce-error .button,
    .woocommerce-info .button {
        width: 100% !important;
        justify-content: center !important;
        margin-top: 10px !important;
        margin-left: 0 !important;
    }
}
