/* =============================================================
   Cable Car Booking – Frontend Styles
   Modern, clean booking widget
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ======================== WIDGET ======================== */
.ccb-widget {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 32px;
    max-width: 520px;
    margin: 0 auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.ccb-widget * {
    box-sizing: border-box;
}

/* Header */
.ccb-widget-header {
    text-align: center;
    margin-bottom: 28px;
    padding: 12px 0 20px;
    border-bottom: 1px solid #e2e8f0;
}

.ccb-widget-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    line-height: 1;
}

.ccb-widget-title {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
}

.ccb-widget-desc {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* Steps */
.ccb-widget-step {
    display: none;
    animation: ccbwFadeIn 0.3s ease;
}

.ccb-widget-step.active {
    display: block;
}

@keyframes ccbwFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.ccb-widget-step h4 {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ccb-fw-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0 0 14px;
    padding: 7px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.ccb-fw-back:hover {
    background: #eef2f7;
    border-color: #94a3b8;
    color: #1e293b;
}

/* Calendar */
.ccb-widget-calendar {
    margin-bottom: 20px;
}

.ccb-fw-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ccb-fw-cal-nav button {
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    color: #334155;
    transition: all 0.2s;
}

.ccb-fw-cal-nav button:hover {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.ccb-fw-cal-label {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.ccb-fw-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.ccb-fw-cal-grid .header-cell {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    padding: 4px 0;
}

.ccb-fw-cal-grid .day-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    background: #fff;
    border: 2px solid transparent;
}

.ccb-fw-cal-grid .day-cell:hover {
    border-color: #3b82f6;
    transform: scale(1.05);
}

.ccb-fw-cal-grid .day-cell.selected {
    border-color: #3b82f6;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
    background: rgba(59, 130, 246, 0.05);
}

.ccb-fw-cal-grid .day-cell.empty {
    background: transparent;
    cursor: default;
}

.ccb-fw-cal-grid .day-cell.available .day-dot { background: #22c55e; }
.ccb-fw-cal-grid .day-cell.limited .day-dot { background: #eab308; }
.ccb-fw-cal-grid .day-cell.sold_out { opacity: 0.4; cursor: not-allowed; }
.ccb-fw-cal-grid .day-cell.sold_out .day-dot { background: #ef4444; }
.ccb-fw-cal-grid .day-cell.none { opacity: 0.3; cursor: not-allowed; }
.ccb-fw-cal-grid .day-cell.none .day-dot { background: #cbd5e1; }
.ccb-fw-cal-grid .day-cell.past { opacity: 0.3; cursor: not-allowed; }
.ccb-fw-cal-grid .day-cell.beyond { opacity: 0.3; cursor: not-allowed; background: #f1f5f9; }

/* Slot overbooking */
.ccb-fw-slot-btn.overbooked {
    background: #fff7ed;
    border-color: #f97316;
    color: #c2410c;
}
.ccb-fw-slot-btn.overbooked .availability.overbooked {
    background: #f97316;
    color: #fff;
}
.ccb-fw-slot-btn.overbooked:hover {
    background: #ffedd5;
    border-color: #ea580c;
}

.ccb-fw-cal-grid .day-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-top: 3px;
}

.ccb-fw-cal-legend {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 12px;
    font-size: 11px;
    color: #64748b;
}

.ccb-fw-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
    vertical-align: middle;
}

.ccb-fw-dot.green { background: #22c55e; }
.ccb-fw-dot.yellow { background: #eab308; }
.ccb-fw-dot.red { background: #ef4444; }

/* Slots */
.ccb-widget-slots {
    margin-bottom: 20px;
}

.ccb-fw-slot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ccb-fw-slot-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    min-height: 110px;
    padding: 16px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-size: 14px;
    color: #334155;
    text-align: left;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.ccb-fw-slot-btn:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(59, 130, 246, 0.14);
}

.ccb-fw-slot-btn.selected {
    border-color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.10), rgba(96, 165, 250, 0.04));
    box-shadow: 0 16px 32px rgba(59, 130, 246, 0.18);
}

.ccb-fw-slot-btn:disabled {
    cursor: not-allowed;
    opacity: 0.75;
    transform: none;
    box-shadow: none;
}

.ccb-fw-slot-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
}

.ccb-fw-slot-btn .time {
    font-weight: 700;
    font-size: 24px;
    line-height: 1;
    color: #0f172a;
}

.ccb-fw-slot-btn .availability {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 6px 10px;
    border-radius: 999px;
    color: #15803d;
    background: rgba(34, 197, 94, 0.12);
}

.ccb-fw-slot-btn.available {
    border-color: rgba(34, 197, 94, 0.16);
}

.ccb-fw-slot-btn .availability.limited {
    color: #eab308;
    background: rgba(234, 179, 8, 0.14);
}

.ccb-fw-slot-btn .availability.full {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

.ccb-fw-slot-btn.full {
    border-color: rgba(239, 68, 68, 0.18);
    background: rgba(248, 250, 252, 0.9);
}

.ccb-fw-slot-meta {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
}

@media (max-width: 640px) {
    .ccb-fw-slot-grid {
        grid-template-columns: 1fr;
    }
}

/* Tickets */
.ccb-fw-ticket-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #e2e8f0;
}

.ccb-fw-ticket-info {
    flex: 1;
}

.ccb-fw-ticket-label {
    font-weight: 600;
    color: #0f172a;
    display: block;
}

.ccb-fw-ticket-price {
    font-size: 14px;
    color: #3b82f6;
    font-weight: 600;
}

.ccb-fw-ticket-age {
    font-size: 12px;
    color: #94a3b8;
    display: block;
    margin-top: 2px;
}

.ccb-fw-ticket-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ccb-fw-qty-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    font-size: 18px;
    color: #334155;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.ccb-fw-qty-btn:hover {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.ccb-fw-qty-input {
    width: 48px;
    text-align: center;
    padding: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    font-family: inherit;
    background: #f8fafc;
}

.ccb-fw-remaining {
    font-size: 11px;
    color: #64748b;
    min-width: 60px;
    text-align: right;
}

/* Total */
.ccb-fw-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-top: 8px;
    border-top: 2px solid #e2e8f0;
    font-size: 16px;
    color: #334155;
}

.ccb-fw-total-price {
    font-size: 28px;
    color: #0f172a;
}

/* Book Button */
.ccb-fw-book-btn {
    width: 100%;
    padding: 16px;
    margin-top: 24px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.ccb-fw-book-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}

.ccb-fw-book-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ccb-widget-empty {
    text-align: center;
    color: #94a3b8;
    padding: 20px;
    font-style: italic;
}

/* ======================== PRODUCT CARD ======================== */
.ccb-product-card {
    font-family: 'Inter', -apple-system, sans-serif;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    max-width: 360px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: all 0.3s;
}

.ccb-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.ccb-product-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.ccb-product-name {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px;
}

.ccb-product-desc {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 12px;
}

.ccb-product-pricing {
    margin-bottom: 12px;
}

.ccb-product-price {
    font-size: 18px;
    font-weight: 700;
    color: #3b82f6;
}

.ccb-product-tickets {
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}

.ccb-product-ticket-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 14px;
    color: #475569;
}

.ccb-product-ticket-row span:last-child {
    margin-left: auto;
    font-weight: 600;
    color: #0f172a;
}

/* ======================== ERROR ======================== */
.ccb-error {
    color: #ef4444;
    font-family: 'Inter', sans-serif;
    text-align: center;
    padding: 20px;
}

/* ======================== EXTRA SERVICES ======================== */
.ccb-widget-step .ccb-fw-extras-heading {
    display: block;
    margin: 50px 0 18px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
    letter-spacing: 0.8px;
}

.ccb-widget-extras {
    margin-bottom: 4px;
}

.ccb-fw-extra-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.ccb-fw-extra-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ccb-fw-extra-icon {
    font-size: 18px;
    line-height: 1;
}

.ccb-fw-extra-label {
    font-weight: 600;
    color: #0f172a;
    font-size: 14px;
}

.ccb-fw-extra-desc {
    font-size: 12px;
    color: #94a3b8;
}

.ccb-fw-extra-price {
    font-size: 13px;
    color: #3b82f6;
    font-weight: 600;
}

.ccb-fw-extra-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
}

.ccb-fw-extra-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    font-size: 18px;
    color: #334155;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    line-height: 1;
}

.ccb-fw-extra-btn:hover {
    background: #8b5cf6;
    color: #fff;
    border-color: #8b5cf6;
}

.ccb-fw-extra-input {
    width: 48px;
    text-align: center;
    padding: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    font-family: inherit;
    background: #f8fafc;
}

/* ======================== COUPON ======================== */
.ccb-fw-coupon { margin: 0 0 16px; }
.ccb-fw-coupon-row { display: flex; gap: 8px; }
.ccb-fw-coupon-input { flex: 1; padding: 10px 14px; border: 1px solid #e2e8f0; border-radius: 10px; font-size: 14px; font-family: monospace; letter-spacing: 1px; text-transform: uppercase; }
.ccb-fw-coupon-input:focus { outline: none; border-color: #3b82f6; }
.ccb-fw-coupon-btn { padding: 10px 18px; background: #3b82f6; color: #fff; border: none; border-radius: 10px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ccb-fw-coupon-btn:hover { background: #2563eb; }
.ccb-fw-coupon-msg { margin-top: 6px; font-size: 13px; }

/* ======================== WAITLIST FORM ======================== */
.ccb-fw-waitlist { margin-top: 16px; padding: 16px; background: #fef3c7; border: 1px solid #f59e0b; border-radius: 12px; }
.ccb-fw-waitlist h4 { margin: 0 0 8px; color: #92400e; font-size: 15px; }
.ccb-fw-waitlist-desc { font-size: 13px; color: #78350f; margin: 0 0 12px; }
.ccb-fw-waitlist-form { display: flex; flex-direction: column; gap: 8px; }
.ccb-fw-wl-name, .ccb-fw-wl-email, .ccb-fw-wl-phone { padding: 10px 14px; border: 1px solid #d97706; border-radius: 8px; font-size: 14px; background: #fff; }
.ccb-fw-wl-name:focus, .ccb-fw-wl-email:focus, .ccb-fw-wl-phone:focus { outline: none; border-color: #f59e0b; }
.ccb-fw-wl-submit { padding: 10px 18px; background: #d97706; color: #fff; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; }
.ccb-fw-wl-submit:hover { background: #b45309; }
.ccb-fw-wl-msg { font-size: 13px; margin-top: 4px; }
.ccb-fw-slot-soldout { cursor: pointer !important; opacity: 0.75; }
.ccb-fw-slot-soldout:hover { opacity: 1; }

/* ======================== PHONE FIELD ======================== */
.ccb-fw-phone { margin: 0 0 16px; }
.ccb-fw-phone-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #64748b; }
.ccb-fw-phone-input { width: 100%; padding: 10px 14px; border: 1px solid #e2e8f0; border-radius: 10px; font-size: 14px; box-sizing: border-box; }
.ccb-fw-phone-input:focus { outline: none; border-color: #3b82f6; }

/* ======================== COUNTDOWN ======================== */
.ccb-fw-countdown {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #dc2626;
    letter-spacing: 0.3px;
}

/* ======================== RESPONSIVE ======================== */
@media (max-width: 600px) {
    .ccb-widget {
        padding: 20px;
        margin: 0 12px;
    }

    .ccb-fw-cal-grid .day-cell {
        font-size: 12px;
    }
}
