/* ═══════════════════════════════════════════════════
   EventsHouse — Calendar CSS
   ═══════════════════════════════════════════════════ */

/* ── Wrapper ─────────────────────────────────────── */
.eh-availability-section {
    background: #fff9f4;
    border-radius: 24px;
    padding: 48px 40px;
    margin-bottom: 48px;
}

.eh-availability-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ff6600;
    margin-bottom: 8px;
}

.eh-availability-section .section-intro {
    color: #888;
    margin-bottom: 32px;
    font-size: 0.95rem;
}

/* ── Calendar Grid ───────────────────────────────── */
.eh-calendar-wrap {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.eh-calendar {
    flex: 0 0 340px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(255,102,0,0.10);
    overflow: hidden;
    user-select: none;
}

/* ── Calendar Header ──────────────────────────── */
.eh-cal-header {
    background: var(--color-primary, #e8734a);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
}

.eh-cal-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.eh-cal-nav {
    background: rgba(255,255,255,0.25);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.eh-cal-nav:hover {
    background: rgba(255,255,255,0.40);
}

/* ── Day Names ───────────────────────────────────── */
.eh-cal-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #fff8f4;
    padding: 8px 8px 0;
}

.eh-cal-days-header span {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: #aaa;
    padding: 4px 0;
}

/* ── Calendar Days grid ──────────────────────────── */
.eh-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 8px;
    gap: 4px;
}

.eh-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s;
    position: relative;
}

.eh-cal-day.empty {
    cursor: default;
}

.eh-cal-day.past {
    color: #ddd;
    cursor: not-allowed;
}

.eh-cal-day.occupied {
    background: #ffe0e0;
    color: #cc3300;
    cursor: not-allowed;
    text-decoration: line-through;
}

.eh-cal-day.occupied::after {
    content: '';
    position: absolute;
    bottom: 3px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #cc3300;
}

.eh-cal-day.available {
    cursor: pointer;
    color: #333;
}

.eh-cal-day.available:hover {
    background: #fff0e8;
    color: #ff6600;
}

.eh-cal-day.selected {
    background: #ff6600 !important;
    color: #fff !important;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255,102,0,0.4);
}

.eh-cal-day.today {
    border: 2px solid #ff9933;
    font-weight: 700;
}

/* ── Legend ──────────────────────────────────────── */
.eh-cal-legend {
    display: flex;
    gap: 16px;
    padding: 12px 16px;
    border-top: 1px solid #f5f0ed;
    background: #fffaf8;
}

.eh-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #888;
}

.eh-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.eh-legend-dot.available-dot  { background: #ff9933; border: 2px solid #ff6600; }
.eh-legend-dot.occupied-dot   { background: #ffe0e0; border: 2px solid #cc3300; }

/* Loading state */
.eh-cal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    text-align: center;
    color: #aaa;
    font-size: 0.9rem;
}

.eh-cal-loading .spin {
    display: inline-block;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

.eh-slot-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    margin: 0 0 8px;
}

.eh-extras-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

.eh-extra-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
    margin: 0;
    font-size: 0.95rem;
}

.eh-extra-price {
    color: #666;
    font-weight: 800;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── Booking Form (right side) ───────────────────── */
.eh-booking-panel {
    flex: 1;
    min-width: 260px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(255,102,0,0.10);
    padding: 28px;
    transition: all 0.3s;
}

.eh-booking-panel h3 {
    color: #ff6600;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.eh-selected-date-badge {
    background: var(--color-primary, #e8734a);
    color: #fff;
    border-radius: 12px;
    padding: 12px 18px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.eh-slot-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.eh-slot-btn {
    border: 2px solid #ffe0cc;
    background: #fff;
    color: #ff6600;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.18s;
}

.eh-slot-btn:hover,
.eh-slot-btn.active {
    background: #ff6600;
    border-color: #ff6600;
    color: #fff;
}

.eh-slot-btn.occupied {
    border-color: #eee;
    color: #ccc;
    background: #f9f9f9;
    cursor: not-allowed;
    text-decoration: line-through;
}

.eh-slot-btn.is-blocked,
.eh-slot-btn:disabled {
    border-color: #e0dcd5;
    color: #b2bec3;
    background: #f4f4f4;
    cursor: not-allowed;
    opacity: 0.85;
}

.eh-slot-btn.is-blocked:hover {
    background: #f4f4f4;
    color: #b2bec3;
    border-color: #e0dcd5;
}

/* Booking form fields */
.eh-bform .form-group { margin-bottom: 14px; }
.eh-bform label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}
.eh-bform input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.eh-bform select,
.eh-bform textarea {
    width: 100%;
    border: 1px solid #e8e0d8;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.eh-bform input[type="checkbox"],
.eh-bform input[type="radio"] {
    width: auto;
    max-width: none;
    flex-shrink: 0;
    margin: 0;
    accent-color: var(--color-primary, #e8734a);
}

/* Extras: lista alinhada à esquerda (evita checkbox com width:100% a empurrar o texto) */
.eh-extras-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 8px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
    text-align: left;
}
.eh-bform label.eh-extra-checkbox {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
    margin: 0;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}
.eh-extra-checkbox-text {
    font-size: 0.95rem;
    flex: 1;
    min-width: 0;
    text-align: left;
}
.eh-bform input:focus,
.eh-bform select:focus,
.eh-bform textarea:focus {
    border-color: #ff6600;
    box-shadow: 0 0 0 3px rgba(255,102,0,0.12);
}
.eh-bform textarea { resize: vertical; min-height: 80px; }
.eh-bform .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.eh-submit-btn {
    width: 100%;
    background: var(--color-primary, #e8734a);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    margin-top: 8px;
}
.eh-submit-btn:hover  { opacity: 0.9; transform: translateY(-1px); }
.eh-submit-btn:active { transform: translateY(0); }
.eh-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.eh-form-message {
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: none;
}
.eh-form-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    display: block;
}
.eh-form-message.error {
    background: #ffebee;
    color: #c62828;
    display: block;
}

/* Not configured message */
.eh-cal-not-configured {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    color: #f57f17;
    font-size: 0.9rem;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 680px) {
    .eh-availability-section { padding: 24px 16px; }
    .eh-calendar-wrap { flex-direction: column; }
    .eh-calendar, .eh-booking-panel { flex: none; width: 100%; }
    .eh-bform .form-row { grid-template-columns: 1fr; }
}
