/* ============================================
   Visit Booking - Frontend Styles
   ============================================ */

/* Widget Container */
.vb-booking-widget {
    max-width: 900px;
    margin: 2em auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Steps */
.vb-step {
    display: none;
}
.vb-step-active {
    display: block;
    animation: vbFadeIn 0.3s ease;
}

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

.vb-step-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3em;
    margin-bottom: 1.2em;
    color: #1a1a1a;
}

.vb-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #2563eb;
    color: #fff;
    border-radius: 50%;
    font-size: 0.75em;
    font-weight: 700;
    flex-shrink: 0;
}

/* Event Type Cards Grid */
.vb-event-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.vb-event-type-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.vb-event-type-card:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.vb-event-type-card.vb-selected {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.vb-card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.vb-card-body {
    padding: 16px 20px;
    flex: 1;
}

.vb-card-body h4 {
    margin: 0 0 8px;
    font-size: 1.15em;
    color: #1a1a1a;
}

.vb-card-description {
    color: #6b7280;
    font-size: 0.9em;
    margin: 0 0 12px;
    line-height: 1.5;
}

.vb-card-pricing {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.vb-price-adult,
.vb-price-child {
    font-size: 0.9em;
    color: #374151;
}

.vb-price-child.vb-free strong {
    color: #059669;
}

.vb-card-duration {
    font-size: 0.85em;
    color: #9ca3af;
}

.vb-btn-select-type {
    margin: 0 20px 16px;
}

/* Event Slots */
.vb-date-group {
    margin-bottom: 24px;
}

.vb-date-header {
    background: #f3f4f6;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 1em;
    color: #374151;
    margin: 0 0 12px;
}

.vb-slots {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vb-event-slot {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.vb-event-slot:hover:not(.vb-slot-full) {
    border-color: #2563eb;
    background: #eff6ff;
}

.vb-event-slot.vb-slot-selected {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.vb-event-slot.vb-slot-full {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9fafb;
}

.vb-slot-time {
    font-weight: 700;
    font-size: 1.05em;
    color: #2563eb;
    white-space: nowrap;
    min-width: 110px;
}

.vb-slot-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vb-slot-title {
    font-weight: 500;
    color: #1a1a1a;
}

.vb-slot-location {
    font-size: 0.85em;
    color: #6b7280;
}

.vb-slot-availability {
    flex-shrink: 0;
}

.vb-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
}

.vb-badge-available {
    background: #d1fae5;
    color: #065f46;
}

.vb-badge-full {
    background: #fee2e2;
    color: #991b1b;
}

/* Participants Form */
.vb-participants-form {
    max-width: 500px;
}

.vb-summary-card {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
    line-height: 1.7;
    color: #1e40af;
}

.vb-participant-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #f3f4f6;
}

.vb-participant-row label {
    font-weight: 500;
    font-size: 1em;
    color: #374151;
}

.vb-price-label {
    font-weight: 400;
    font-size: 0.85em;
    color: #6b7280;
    margin-left: 6px;
}

.vb-qty-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.vb-qty-minus,
.vb-qty-plus {
    background: #f9fafb;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 1.2em;
    cursor: pointer;
    color: #374151;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vb-qty-minus:hover,
.vb-qty-plus:hover {
    background: #e5e7eb;
}

.vb-qty-control input {
    width: 50px;
    text-align: center;
    border: none;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    font-size: 1em;
    font-weight: 600;
    height: 40px;
    padding: 0;
    margin: 0;
    background: #fff;
    -moz-appearance: textfield;
}

.vb-qty-control input::-webkit-outer-spin-button,
.vb-qty-control input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Total */
.vb-total-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px solid #e5e7eb;
}

.vb-total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2em;
}

.vb-total-line strong {
    font-size: 1.3em;
    color: #2563eb;
}

.vb-remaining-spots {
    font-size: 0.85em;
    color: #059669;
    margin-top: 4px;
}

/* Buttons */
.vb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    text-decoration: none;
}

.vb-btn-primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.vb-btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.vb-btn-primary:disabled {
    background: #93c5fd;
    border-color: #93c5fd;
    cursor: not-allowed;
}

.vb-btn-secondary {
    background: #fff;
    color: #374151;
    border-color: #d1d5db;
}

.vb-btn-secondary:hover {
    background: #f3f4f6;
    color: #1a1a1a;
}

.vb-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    align-items: center;
}

/* Confirmation */
.vb-confirmation {
    text-align: center;
    padding: 40px 20px;
}

.vb-confirmation-icon {
    width: 64px;
    height: 64px;
    background: #d1fae5;
    color: #065f46;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 16px;
}

.vb-confirmation h3 {
    font-size: 1.4em;
    color: #065f46;
    margin-bottom: 12px;
}

.vb-confirmation .vb-actions {
    justify-content: center;
}

/* Loading */
.vb-events-loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.vb-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: vbSpin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes vbSpin {
    to { transform: rotate(360deg); }
}

/* Notices */
.vb-notice {
    padding: 16px 20px;
    border-radius: 8px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.vb-notice-error {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

/* Responsive */
@media (max-width: 600px) {
    .vb-event-types-grid {
        grid-template-columns: 1fr;
    }

    .vb-event-slot {
        flex-wrap: wrap;
        gap: 8px;
    }

    .vb-slot-time {
        min-width: auto;
    }

    .vb-actions {
        flex-direction: column;
    }

    .vb-actions .vb-btn {
        width: 100%;
    }
}
