/* ============================================
   NORMS BOOKING WIDGET
   Prefix: norms-booking-
   ============================================ */

/* Container */
.norms-booking-widget {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    max-width: 720px;
    margin: 0 auto;
    color: #1a1a1a;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Loading spinner */
.norms-booking-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
}

.norms-booking-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e0e0e0;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: norms-booking-spin 0.8s linear infinite;
}

@keyframes norms-booking-spin {
    to { transform: rotate(360deg); }
}

/* Error message */
.norms-booking-error {
    background: #fdf2f2;
    border: 1px solid #d9534f;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #d9534f;
    font-size: 0.9rem;
}

/* ============================================
   STEP INDICATOR
   ============================================ */
.norms-booking-steps {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 32px;
}

.norms-booking-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    min-width: 80px;
}

.norms-booking-step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #999;
    transition: all 0.3s ease;
}

.norms-booking-step-dot.active {
    background: #1a1a1a;
    color: #ffffff;
}

.norms-booking-step-dot.completed {
    background: #333333;
    color: #ffffff;
}

.norms-booking-step-label {
    font-size: 0.7rem;
    color: #999999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    text-align: center;
}

.norms-booking-step-label.active {
    color: #1a1a1a;
    font-weight: 600;
}

.norms-booking-step-connector {
    flex: 1;
    height: 2px;
    background: #e0e0e0;
    align-self: center;
    margin-top: -12px;
    min-width: 30px;
}

.norms-booking-step-connector.completed {
    background: #333333;
}

/* ============================================
   SECTION HEADINGS
   ============================================ */
.norms-booking-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 6px;
    color: #1a1a1a;
}

.norms-booking-section-subtitle {
    font-size: 0.9rem;
    color: #666666;
    margin: 0 0 16px;
}

/* Dealer services badge */
.norms-booking-dealer-badge {
    background: #f8f8f8;
    border-left: 3px solid #1a1a1a;
    padding: 10px 16px;
    margin-bottom: 24px;
    font-size: 0.85rem;
    color: #333333;
    border-radius: 0 4px 4px 0;
}

/* Custom service input */
.norms-booking-custom-service {
    margin-top: 16px;
    margin-bottom: 8px;
}

.norms-booking-custom-service .norms-booking-textarea {
    min-height: 80px;
}

/* ============================================
   STEP 1: SERVICE SELECTION
   ============================================ */
.norms-booking-services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.norms-booking-service-card {
    background: #f8f8f8;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.norms-booking-service-card:hover {
    background: #1a1a1a;
    color: #ffffff;
    transform: translateY(-2px);
}

.norms-booking-service-card:hover .norms-booking-service-meta {
    color: #cccccc;
}

.norms-booking-service-card.selected {
    border-color: #1a1a1a;
    background: #1a1a1a;
    color: #ffffff;
}

.norms-booking-service-card.selected .norms-booking-service-meta {
    color: #cccccc;
}

.norms-booking-service-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.norms-booking-service-meta {
    font-size: 0.8rem;
    color: #666666;
    transition: color 0.3s ease;
}

/* ============================================
   STEP 2: DATE & TIME
   ============================================ */
.norms-booking-datetime-layout {
    display: flex;
    gap: 32px;
    margin-bottom: 24px;
}

.norms-booking-calendar-panel {
    flex: 1;
}

.norms-booking-timeslots-panel {
    flex: 1;
}

/* Calendar */
.norms-booking-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.norms-booking-calendar-title {
    font-size: 1rem;
    font-weight: 600;
}

.norms-booking-calendar-nav {
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    color: #1a1a1a;
    font-family: inherit;
}

.norms-booking-calendar-nav:hover {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
}

.norms-booking-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
}

.norms-booking-calendar-day-header {
    font-size: 0.7rem;
    font-weight: 600;
    color: #999999;
    padding: 8px 0;
    text-transform: uppercase;
}

.norms-booking-calendar-day {
    padding: 8px 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    border: none;
    background: none;
    color: #1a1a1a;
    font-family: inherit;
}

.norms-booking-calendar-day:hover:not(.disabled):not(.selected) {
    background: #f8f8f8;
}

.norms-booking-calendar-day.selected {
    background: #1a1a1a;
    color: #ffffff;
    font-weight: 600;
}

.norms-booking-calendar-day.disabled {
    color: #e0e0e0;
    cursor: default;
}

.norms-booking-calendar-day.today:not(.selected) {
    font-weight: 700;
}

.norms-booking-calendar-day.empty {
    cursor: default;
}

/* Time slots */
.norms-booking-timeslots-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.norms-booking-timeslots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
}

.norms-booking-timeslot {
    padding: 10px 6px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #ffffff;
    cursor: pointer;
    font-size: 0.8rem;
    text-align: center;
    transition: all 0.2s ease;
    color: #1a1a1a;
    font-family: inherit;
    font-weight: 500;
}

.norms-booking-timeslot:hover:not(.disabled):not(.selected) {
    border-color: #1a1a1a;
}

.norms-booking-timeslot.selected {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
}

.norms-booking-timeslot.disabled {
    background: #f8f8f8;
    color: #cccccc;
    cursor: default;
    border-color: #f0f0f0;
}

.norms-booking-timeslots-empty {
    color: #999999;
    font-size: 0.85rem;
    padding: 20px 0;
    text-align: center;
    font-style: italic;
}

/* Service type radios */
.norms-booking-service-type {
    margin-top: 20px;
}

.norms-booking-service-type-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.norms-booking-radio-group {
    display: flex;
    gap: 12px;
}

.norms-booking-radio-option {
    flex: 1;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.norms-booking-radio-option:hover {
    border-color: #1a1a1a;
}

.norms-booking-radio-option.selected {
    border-color: #1a1a1a;
    background: #f8f8f8;
}

.norms-booking-radio-option input[type="radio"] {
    accent-color: #1a1a1a;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.norms-booking-radio-option span {
    font-size: 0.9rem;
    color: #333;
}

.norms-booking-radio-option .norms-booking-radio-desc {
    font-size: 0.75rem;
    color: #999;
    display: block;
    margin-top: 2px;
}

/* ============================================
   STEP 3: CUSTOMER INFO FORM
   ============================================ */
.norms-booking-summary-bar {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    gap: 24px;
    font-size: 0.85rem;
}

.norms-booking-summary-item {
    display: flex;
    gap: 6px;
}

.norms-booking-summary-item strong {
    font-weight: 600;
}

.norms-booking-form-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 14px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e0e0e0;
}

.norms-booking-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.norms-booking-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.norms-booking-form-group.full-width {
    grid-column: 1 / -1;
}

.norms-booking-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #333;
}

.norms-booking-input,
.norms-booking-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    color: #1a1a1a;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.norms-booking-input:focus,
.norms-booking-textarea:focus {
    border-color: #1a1a1a;
    outline: none;
}

.norms-booking-textarea {
    resize: vertical;
    min-height: 70px;
}

/* ============================================
   STEP 4: SUCCESS
   ============================================ */
.norms-booking-success {
    text-align: center;
    padding: 20px 0;
}

.norms-booking-success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #1a1a1a;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: norms-booking-scale-in 0.5s ease;
}

.norms-booking-success-icon::after {
    content: '';
    display: block;
    width: 22px;
    height: 12px;
    border-left: 3px solid #ffffff;
    border-bottom: 3px solid #ffffff;
    transform: rotate(-45deg);
    margin-top: -4px;
}

@keyframes norms-booking-scale-in {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.norms-booking-success h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1a1a1a;
}

.norms-booking-success-message {
    color: #666666;
    margin: 0 0 24px;
    font-size: 0.9rem;
}

.norms-booking-success-details {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 24px;
    text-align: left;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.norms-booking-detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.norms-booking-detail-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #999999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.norms-booking-detail-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: #1a1a1a;
}

/* ============================================
   BUTTONS
   ============================================ */
.norms-booking-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.norms-booking-actions.center {
    justify-content: center;
}

.norms-booking-btn {
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 14px 36px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.norms-booking-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.norms-booking-btn:disabled {
    opacity: 0.4;
    cursor: default;
    transform: none;
}

.norms-booking-btn-secondary {
    background: #ffffff;
    color: #1a1a1a;
    border: 2px solid #e0e0e0;
}

.norms-booking-btn-secondary:hover:not(:disabled) {
    background: #f8f8f8;
    border-color: #cccccc;
    box-shadow: none;
    transform: none;
}

.norms-booking-btn-small {
    padding: 8px 16px;
    font-size: 0.8rem;
    min-width: auto;
    flex-shrink: 0;
}

/* License plate lookup row */
.norms-booking-plate-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.norms-booking-plate-row .norms-booking-input {
    flex: 1;
}

/* SMS opt-in checkbox */
.norms-booking-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 0.8rem;
    color: #666666;
    cursor: pointer;
}

.norms-booking-checkbox-label input[type="checkbox"] {
    accent-color: #1a1a1a;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ============================================
   STEP ANIMATION
   ============================================ */
.norms-booking-step-content {
    animation: norms-booking-fade-in 0.4s ease;
}

@keyframes norms-booking-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   MODAL
   ============================================ */
.norms-booking-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.norms-booking-modal-overlay.open {
    display: flex;
}

.norms-booking-modal {
    background: #ffffff;
    border-radius: 8px;
    max-width: 760px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: norms-booking-modal-in 0.3s ease;
}

@keyframes norms-booking-modal-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.norms-booking-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f8f8f8;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #666;
    transition: all 0.2s ease;
    z-index: 1;
    font-family: inherit;
    line-height: 1;
}

.norms-booking-modal-close:hover {
    background: #1a1a1a;
    color: #ffffff;
}

/* Widget inside modal needs no extra outer padding */
.norms-booking-modal .norms-booking-widget {
    max-width: 100%;
}

/* ============================================
   HERO TRIGGER BUTTON HOVER
   ============================================ */
.norms-booking-trigger .wp-block-button__link {
    transition: all 0.3s ease;
}

.norms-booking-trigger .wp-block-button__link:hover {
    background: #ffffff !important;
    color: #1a1a1a !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .norms-booking-modal {
        padding: 24px 16px;
        max-height: 95vh;
        margin: 10px;
    }

    .norms-booking-modal-overlay {
        padding: 0;
    }

    .norms-booking-services-grid {
        grid-template-columns: 1fr;
    }

    .norms-booking-datetime-layout {
        flex-direction: column;
        gap: 24px;
    }

    .norms-booking-form-grid {
        grid-template-columns: 1fr;
    }

    .norms-booking-timeslots-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .norms-booking-summary-bar {
        flex-direction: column;
        gap: 8px;
    }

    .norms-booking-success-details {
        grid-template-columns: 1fr;
    }

    .norms-booking-radio-group {
        flex-direction: column;
    }

    .norms-booking-actions {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .norms-booking-btn,
    .norms-booking-btn-secondary {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .norms-booking-timeslots-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .norms-booking-btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .norms-booking-step-label {
        font-size: 0.6rem;
    }

    .norms-booking-step-dot {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}
