﻿/* =========================================================
   CN HUNTER BOOKING
   Compact Professional Responsive Design
   ========================================================= */

/* Base */

.cnhb-booking-wrapper {
    --cnhb-primary: #012f6f;
    --cnhb-secondary: #D6A84B;
    --cnhb-font: inherit;
    --cnhb-text: #172033;
    --cnhb-muted: #667085;
    --cnhb-border: #e5e9f0;
    --cnhb-surface: #ffffff;
    --cnhb-soft: #f7f8fa;

    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: var(--cnhb-text);
    font-family: var(--cnhb-font);
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
}

.cnhb-booking-wrapper *,
.cnhb-booking-wrapper *::before,
.cnhb-booking-wrapper *::after {
    box-sizing: border-box;
}

/* Form Container */

.cnhb-booking-wrapper .cnhb-booking-form {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 22px;
    color: var(--cnhb-text);
    background: var(--cnhb-surface);
    border: 1px solid var(--cnhb-border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(16, 24, 40, .05);
    font-family: var(--cnhb-font);
}

/* Headings */

.cnhb-booking-form h2 {
    margin: 0 0 17px;
    color: var(--cnhb-primary);
    font-family: var(--cnhb-font);
    font-size: 23px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.3px;
    text-align: center;
}

.cnhb-booking-form h3,
.cnhb-form-step > h3 {
    margin: 0 0 13px;
    color: var(--cnhb-text);
    font-family: var(--cnhb-font);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

/* Logo */

.cnhb-business-logo {
    margin: 0 0 12px !important;
    text-align: center;
}

.cnhb-business-logo img {
    display: inline-block;
    width: auto;
    max-width: min(125px, 100%);
    max-height: 65px;
    object-fit: contain;
}

/* Progress Indicator */

.cnhb-step-progress {
    position: relative;
    margin: 0 0 22px;
    padding: 0 4px;
}

.cnhb-progress-track {
    position: absolute;
    top: 15px;
    left: 16.66%;
    right: 16.66%;
    height: 2px;
    overflow: hidden;
    background: var(--cnhb-border);
    border-radius: 10px;
}

.cnhb-progress-fill {
    width: 0;
    height: 100%;
    background: var(--cnhb-secondary);
    border-radius: inherit;
    transition: width .25s ease;
}

.cnhb-step-indicators {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 6px;
}

.cnhb-step-indicator {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-align: center;
}

.cnhb-step-number {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: var(--cnhb-muted);
    background: #fff;
    border: 1px solid var(--cnhb-border);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    transition: all .2s ease;
}

.cnhb-step-indicator.is-active .cnhb-step-number {
    color: #fff;
    background: var(--cnhb-primary);
    border-color: var(--cnhb-primary);
}

.cnhb-step-indicator.is-completed .cnhb-step-number {
    color: #fff;
    background: var(--cnhb-secondary);
    border-color: var(--cnhb-secondary);
}

.cnhb-step-label {
    color: var(--cnhb-muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
}

.cnhb-step-indicator.is-active .cnhb-step-label {
    color: var(--cnhb-primary);
    font-weight: 700;
}

.cnhb-step-indicator.is-completed .cnhb-step-label {
    color: var(--cnhb-text);
}

/* Wizard Steps */

.cnhb-booking-wrapper .cnhb-form-step[hidden] {
    display: none !important;
}

.cnhb-booking-wrapper .cnhb-form-step.is-active {
    display: block;
    animation: cnhb-step-enter .2s ease;
}

.cnhb-form-step > h3 {
    margin-bottom: 14px;
}

@keyframes cnhb-step-enter {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fields */

.cnhb-field {
    min-width: 0;
    margin: 0 0 14px;
}

.cnhb-field label {
    display: block;
    margin: 0 0 6px;
    color: var(--cnhb-text);
    font-family: var(--cnhb-font);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
}

.cnhb-field input,
.cnhb-field select,
.cnhb-field textarea {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    margin: 0;
    padding: 9px 11px;
    color: var(--cnhb-text);
    background: #fff;
    border: 1px solid #dce2eb;
    border-radius: 8px;
    outline: none;
    box-shadow: none;
    font-family: var(--cnhb-font);
    font-size: 14px;
    line-height: 1.45;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.cnhb-field textarea {
    min-height: 85px;
    resize: vertical;
}

.cnhb-field input:focus,
.cnhb-field select:focus,
.cnhb-field textarea:focus {
    border-color: var(--cnhb-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cnhb-primary) 12%, transparent);
}

.cnhb-field input::placeholder,
.cnhb-field textarea::placeholder {
    color: #98a2b3;
}

/* Honeypot */

.cnhb-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Calendar */

.cnhb-calendar,
.cnhb-available-times {
    width: 100%;
    min-width: 0;
    margin: 14px 0;
    padding: 13px;
    background: var(--cnhb-soft);
    border: 1px solid var(--cnhb-border);
    border-radius: 10px;
}

.cnhb-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 11px;
}

.cnhb-calendar-header strong {
    color: var(--cnhb-primary);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.cnhb-calendar-header button {
    display: grid;
    flex: 0 0 32px;
    place-items: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    color: var(--cnhb-primary);
    background: #fff;
    border: 1px solid var(--cnhb-border);
    border-radius: 7px;
    font-family: var(--cnhb-font);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.cnhb-calendar-header button:hover:not(:disabled) {
    color: #fff;
    background: var(--cnhb-primary);
}

.cnhb-calendar-header button:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.cnhb-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
    width: 100%;
}

.cnhb-weekday {
    min-width: 0;
    padding: 5px 0;
    color: var(--cnhb-muted);
    font-size: 10px;
    font-weight: 700;
    text-align: center;
}

.cnhb-calendar-empty {
    min-height: 32px;
}

.cnhb-calendar-day {
    display: grid;
    place-items: center;
    width: 100%;
    min-width: 0;
    min-height: 35px;
    margin: 0;
    padding: 3px;
    color: var(--cnhb-text);
    background: #fff;
    border: 1px solid var(--cnhb-border);
    border-radius: 7px;
    font-family: var(--cnhb-font);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: all .18s ease;
}

.cnhb-calendar-day:hover:not(:disabled) {
    color: var(--cnhb-primary);
    border-color: var(--cnhb-primary);
    background: color-mix(in srgb, var(--cnhb-primary) 6%, white);
}

.cnhb-calendar-day.is-selected {
    color: #fff;
    background: var(--cnhb-primary);
    border-color: var(--cnhb-primary);
}

.cnhb-calendar-day.is-disabled,
.cnhb-calendar-day:disabled {
    color: #b8bfca;
    background: #f0f2f5;
    border-color: transparent;
    cursor: not-allowed;
    opacity: .65;
}

/* Available Time Slots */

.cnhb-time-slots {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
    min-width: 0;
}

.cnhb-time-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 38px;
    margin: 0;
    padding: 7px 5px;
    color: var(--cnhb-primary);
    background: #fff;
    border: 1px solid var(--cnhb-primary);
    border-radius: 7px;
    font-family: var(--cnhb-font);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.3;
    cursor: pointer;
    transition: all .2s ease;
}

.cnhb-time-button:hover,
.cnhb-time-button.is-selected {
    color: #fff;
    background: var(--cnhb-primary);
    border-color: var(--cnhb-primary);
}

.cnhb-slot-message {
    grid-column: 1 / -1;
    margin: 0;
    padding: 11px;
    color: var(--cnhb-muted);
    background: #fff;
    border: 1px dashed #cbd3df;
    border-radius: 8px;
    font-size: 12px;
    text-align: center;
}

/* Customer Details */

.cnhb-customer-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 0;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--cnhb-border);
}

.cnhb-customer-details > h3 {
    grid-column: 1 / -1;
    margin-bottom: 12px;
}

.cnhb-customer-details .cnhb-field {
    min-width: 0;
    margin-bottom: 12px;
}

.cnhb-customer-details .cnhb-field:has(textarea) {
    grid-column: 1 / -1;
}

.cnhb-customer-details .iti {
    width: 100%;
}

/* Wizard Navigation */

.cnhb-step-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    margin-top: 17px;
}

.cnhb-next-button,
.cnhb-prev-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 40px;
    margin: 0;
    padding: 9px 14px;
    border: 1px solid var(--cnhb-primary);
    border-radius: 8px;
    font-family: var(--cnhb-font);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.cnhb-next-button {
    margin-left: auto;
    color: #fff;
    background: var(--cnhb-primary);
}

.cnhb-next-button:hover {
    color: #fff;
    background: color-mix(in srgb, var(--cnhb-primary) 85%, black);
}

.cnhb-prev-button {
    color: var(--cnhb-primary);
    background: #fff;
}

.cnhb-prev-button:hover {
    color: #fff;
    background: var(--cnhb-primary);
}

.cnhb-next-button:focus-visible,
.cnhb-prev-button:focus-visible {
    outline: 2px solid var(--cnhb-secondary);
    outline-offset: 2px;
}

.cnhb-wizard-message {
    margin: 0 0 12px;
    padding: 9px 11px;
    color: #b42318;
    background: #fef3f2;
    border: 1px solid #fecdca;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1.5;
}

/* Submit Button */

.cnhb-submit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin: 10px 0 0;
    padding: 10px 16px;
    color: #fff;
    background: var(--cnhb-primary);
    border: 0;
    border-radius: 8px;
    font-family: var(--cnhb-font);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
    transition: background .2s ease, box-shadow .2s ease;
}

.cnhb-submit-button:hover {
    color: #fff;
    background: color-mix(in srgb, var(--cnhb-primary) 85%, black);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--cnhb-primary) 20%, transparent);
}

.cnhb-submit-button:focus-visible {
    outline: 2px solid var(--cnhb-secondary);
    outline-offset: 3px;
}

/* Messages */

.cnhb-success-message {
    margin: 0 0 16px;
    padding: 11px 13px;
    color: #17663a;
    background: #ecfdf3;
    border: 1px solid #abefc6;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}

/* Layout Modes
   All modes use the width supplied by Elementor or the parent container.
*/
.cnhb-layout-full,
.cnhb-layout-inline,
.cnhb-layout-sidebar {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.cnhb-layout-full {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    position: relative;
    margin: 0;
    padding: 32px 24px;
    background: var(--cnhb-soft);
    box-sizing: border-box;
    overflow: hidden;
}

.cnhb-layout-inline .cnhb-booking-form,
.cnhb-layout-sidebar .cnhb-booking-form {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.cnhb-layout-full .cnhb-booking-form {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Popup */

.cnhb-popup-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin: 0;
    padding: 10px 18px;
    color: #fff;
    background: var(--cnhb-primary);
    border: 0;
    border-radius: 8px;
    font-family: var(--cnhb-font);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease;
}

.cnhb-popup-trigger:hover {
    color: #fff;
    background: color-mix(in srgb, var(--cnhb-primary) 85%, black);
}

.cnhb-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 18, 32, .72);
    backdrop-filter: blur(4px);
    overflow-y: auto;
}

.cnhb-popup-overlay.is-open {
    display: flex;
    animation: cnhb-fade-in .2s ease;
}

.cnhb-popup-dialog {
    position: relative;
    width: 100%;
    max-width: 620px;
    max-height: calc(100vh - 40px);
    margin: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 12px;
}

.cnhb-popup-dialog .cnhb-booking-form {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.cnhb-popup-close {
    position: absolute;
    top: 9px;
    right: 9px;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    color: var(--cnhb-text);
    background: #fff;
    border: 1px solid var(--cnhb-border);
    border-radius: 50%;
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
}

body.cnhb-popup-open {
    overflow: hidden;
}

@keyframes cnhb-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Sidebar and Narrow Containers */

.cnhb-layout-sidebar .cnhb-booking-form {
    padding: 14px;
}

.cnhb-layout-sidebar .cnhb-booking-form h2 {
    font-size: 20px;
    margin-bottom: 14px;
}

.cnhb-layout-sidebar .cnhb-step-progress {
    margin-bottom: 18px;
}

.cnhb-layout-sidebar .cnhb-step-label {
    font-size: 10px;
}

.cnhb-layout-sidebar .cnhb-calendar,
.cnhb-layout-sidebar .cnhb-available-times {
    padding: 10px;
    margin: 12px 0;
}

.cnhb-layout-sidebar .cnhb-calendar-grid {
    gap: 3px;
}

.cnhb-layout-sidebar .cnhb-calendar-day {
    min-height: 32px;
    font-size: 11px;
}

.cnhb-layout-sidebar .cnhb-weekday {
    font-size: 9px;
}

.cnhb-layout-sidebar .cnhb-time-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cnhb-layout-sidebar .cnhb-field input,
.cnhb-layout-sidebar .cnhb-field select,
.cnhb-layout-sidebar .cnhb-field textarea {
    font-size: 13px;
}

/* Tablet */

@media (max-width: 768px) {
    .cnhb-booking-wrapper .cnhb-booking-form {
        padding: 17px;
    }

    .cnhb-booking-form h2 {
        font-size: 21px;
    }

    .cnhb-calendar,
    .cnhb-available-times {
        padding: 11px;
    }

    .cnhb-time-slots {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cnhb-popup-overlay {
        padding: 14px;
    }

    .cnhb-popup-dialog {
        max-height: calc(100vh - 28px);
    }

        .cnhb-customer-details {
        grid-template-columns: minmax(0, 1fr);
    }

    .cnhb-customer-details > h3,
    .cnhb-customer-details .cnhb-field:has(textarea) {
        grid-column: 1;
    }

    .cnhb-layout-full {
        padding: 20px 12px;
    }
}

/* Mobile */

@media (max-width: 480px) {
    .cnhb-booking-wrapper .cnhb-booking-form {
        padding: 13px;
        border-radius: 9px;
    }

    .cnhb-booking-form h2 {
        margin-bottom: 14px;
        font-size: 19px;
    }

    .cnhb-booking-form h3,
    .cnhb-form-step > h3 {
        font-size: 15px;
    }

    .cnhb-business-logo img {
        max-width: 110px;
        max-height: 58px;
    }

    .cnhb-step-progress {
        margin-bottom: 17px;
    }

    .cnhb-step-indicators {
        gap: 3px;
    }

    .cnhb-step-number {
        width: 29px;
        height: 29px;
        font-size: 11px;
    }

    .cnhb-progress-track {
        top: 13px;
    }

    .cnhb-step-label {
        font-size: 9px;
    }

    .cnhb-calendar,
    .cnhb-available-times {
        padding: 9px;
        margin: 11px 0;
    }

    .cnhb-calendar-grid {
        gap: 3px;
    }

    .cnhb-calendar-day {
        min-height: 31px;
        font-size: 11px;
    }

    .cnhb-calendar-empty {
        min-height: 29px;
    }

    .cnhb-weekday {
        font-size: 9px;
    }

    .cnhb-time-slots {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .cnhb-time-button {
        min-height: 36px;
        padding: 6px 4px;
        font-size: 11px;
    }

    .cnhb-field input,
    .cnhb-field select,
    .cnhb-field textarea {
        min-height: 41px;
        font-size: 14px;
    }

    .cnhb-step-actions {
        gap: 6px;
    }

    .cnhb-next-button,
    .cnhb-prev-button {
        min-height: 38px;
        padding: 8px 10px;
        font-size: 11px;
    }

    .cnhb-submit-button {
        min-height: 42px;
        font-size: 13px;
    }

    .cnhb-popup-overlay {
        align-items: flex-start;
        padding: 8px;
    }

    .cnhb-popup-dialog {
        max-height: calc(100dvh - 16px);
        border-radius: 9px;
    }

    .cnhb-popup-dialog .cnhb-booking-form {
        padding: 13px;
        border-radius: 9px;
    }
}

/* Reduced Motion */

@media (prefers-reduced-motion: reduce) {
    .cnhb-booking-wrapper *,
    .cnhb-booking-wrapper *::before,
    .cnhb-booking-wrapper *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* =========================================
   CNHB Typography Refinement
========================================= */

.cnhb-booking-wrapper,
.cnhb-booking-wrapper * {
    font-family: var(--cnhb-font, inherit) !important;
    box-sizing: border-box;
}

.cnhb-booking-wrapper {
    font-size: 13px;
    line-height: 1.5;
}

.cnhb-booking-wrapper .cnhb-booking-title,
.cnhb-booking-wrapper .cnhb-booking-form h2 {
    font-size: 20px !important;
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 18px;
}

.cnhb-booking-wrapper .cnhb-booking-form h3,
.cnhb-booking-wrapper .cnhb-form-step > h3,
.cnhb-booking-wrapper .cnhb-customer-details h3 {
    font-size: 15px !important;
    line-height: 1.4;
    font-weight: 600;
}

.cnhb-booking-wrapper label {
    font-size: 12px !important;
    line-height: 1.4;
}

.cnhb-booking-wrapper input,
.cnhb-booking-wrapper select,
.cnhb-booking-wrapper textarea {
    font-size: 13px !important;
}

.cnhb-booking-wrapper button {
    font-size: 13px !important;
}

.cnhb-booking-wrapper .cnhb-calendar,
.cnhb-booking-wrapper .cnhb-time-slots {
    font-size: 12px;
}

@media (max-width: 767px) {
    .cnhb-booking-wrapper .cnhb-booking-title,
    .cnhb-booking-wrapper .cnhb-booking-form h2 {
        font-size: 18px !important;
    }

    .cnhb-booking-wrapper .cnhb-booking-form h3,
    .cnhb-booking-wrapper .cnhb-form-step > h3,
    .cnhb-booking-wrapper .cnhb-customer-details h3 {
        font-size: 14px !important;
    }
}

