/* ==========================================================================
   Værksted booking Form
   ========================================================================== */

.c1st-booking {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1e293b;
    box-sizing: border-box;
}

.c1st-booking *,
.c1st-booking *::before,
.c1st-booking *::after {
    box-sizing: inherit;
}

/* Generic info notice (e.g. opening hours, deadlines) */
.c1st-info-notice {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: #78350f;
}
.c1st-info-notice-icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* Request-mode banner */
.c1st-mode-banner {
    background: #fefce8;
    border: 1px solid #fde047;
    border-left: 4px solid #eab308;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
    line-height: 1.5;
}
.c1st-mode-banner strong {
    font-size: 15px;
    color: #854d0e;
}
.c1st-mode-banner span {
    color: #713f12;
}

/* Progress Steps */
.c1st-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    position: relative;
}

.c1st-steps::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: #e2e8f0;
    z-index: 0;
}

.c1st-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #94a3b8;
    position: relative;
    z-index: 1;
}

.c1st-step span {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
}

.c1st-step.active span {
    background: #1e40af;
    color: #fff;
}

.c1st-step.active {
    color: #1e40af;
    font-weight: 600;
}

.c1st-step.done span {
    background: #16a34a;
    color: #fff;
}

.c1st-step.done {
    color: #16a34a;
}

/* Panels */
.c1st-panel {
    animation: c1stFadeIn 0.3s ease;
}

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

.c1st-panel h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 24px;
    color: #0f172a;
}

/* Fields */
.c1st-field {
    margin-bottom: 20px;
}

.c1st-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #334155;
}

.c1st-field input[type="text"],
.c1st-field input[type="email"],
.c1st-field input[type="tel"],
.c1st-field input[type="date"],
.c1st-field select,
.c1st-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.2s;
}

.c1st-field input:focus,
.c1st-field select:focus,
.c1st-field textarea:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.c1st-phone-row {
    display: flex;
    gap: 10px;
}

.c1st-phone-row input {
    flex: 1;
}

.c1st-address-hint {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 8px;
}

.c1st-known-customer {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 0 0 16px;
    font-size: 14px;
    color: #334155;
}

.c1st-known-customer p {
    margin: 0 0 6px;
}

.c1st-link-btn {
    background: none;
    border: 0;
    padding: 0;
    color: #2563eb;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
}

.c1st-address-row {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.c1st-address-row input:last-child {
    flex: 1;
}

/* Status messages */
.c1st-status {
    font-size: 13px;
    margin-top: 6px;
    min-height: 20px;
}

.c1st-status.found {
    color: #16a34a;
}

.c1st-status.not-found {
    color: #f59e0b;
}

.c1st-status.loading {
    color: #64748b;
}

.c1st-status.error {
    color: #dc2626;
}

/* Buttons */
.c1st-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.c1st-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.c1st-btn-primary {
    background: #1e40af;
    color: #fff;
}

.c1st-btn-primary:hover:not(:disabled) {
    background: #1e3a8a;
}

.c1st-booking .c1st-btn-secondary,
.c1st-booking button.c1st-btn-secondary {
    background: #334155;
    color: #ffffff !important;
    border: 1px solid #334155;
}

.c1st-booking .c1st-btn-secondary:hover:not(:disabled),
.c1st-booking button.c1st-btn-secondary:hover:not(:disabled) {
    background: #1e293b;
    border-color: #1e293b;
    color: #ffffff !important;
}

.c1st-btn-next {
    background: #1e40af;
    color: #fff;
}

.c1st-btn-next:hover:not(:disabled) {
    background: #1e3a8a;
}

.c1st-btn-back {
    background: transparent;
    color: #64748b;
    border: 1px solid #d1d5db;
}

.c1st-btn-back:hover:not(:disabled) {
    background: #f8fafc;
}

.c1st-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 28px;
    gap: 12px;
}

.c1st-nav .c1st-btn-next,
.c1st-nav .c1st-btn-primary {
    margin-left: auto;
}

/* Service Categories (Accordion) */
.c1st-service-categories {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.c1st-category {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.c1st-category.has-selected {
    border-color: #1e40af;
}

.c1st-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    cursor: pointer;
    background: #f8fafc;
    user-select: none;
    transition: background 0.2s;
}

.c1st-category-header:hover {
    background: #f1f5f9;
}

.c1st-category-title {
    font-weight: 600;
    font-size: 15px;
    color: #0f172a;
}

.c1st-category-count {
    font-size: 13px;
    color: #64748b;
    font-weight: 400;
}

.c1st-category-arrow {
    transition: transform 0.3s ease;
    color: #64748b;
    font-size: 12px;
}

.c1st-category.open .c1st-category-arrow {
    transform: rotate(180deg);
}

.c1st-category-items {
    display: none;
    padding: 4px 14px 14px;
}

.c1st-category.open .c1st-category-items {
    display: block;
}

/* Service items (checkboxes) */
.c1st-service-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.c1st-service-item:hover {
    background: #f1f5f9;
}

.c1st-service-item input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: #1e40af;
    flex-shrink: 0;
}

.c1st-service-info {
    flex: 1;
}

.c1st-service-name {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
}

.c1st-service-desc {
    font-size: 13px;
    color: #64748b;
    margin-top: 2px;
}

.c1st-service-price {
    font-size: 13px;
    color: #1e40af;
    font-weight: 600;
    margin-top: 2px;
}

/* Free text service (write what you need) */
.c1st-freetext-note {
    font-size: 13px;
    color: #64748b;
    font-style: italic;
    padding: 8px 12px;
}

/* Calendar */
.c1st-calendar-wrap {
    margin-bottom: 20px;
}

.c1st-calendar {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.c1st-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #1e40af;
    color: #fff;
}

.c1st-cal-title {
    font-weight: 700;
    font-size: 16px;
    text-transform: capitalize;
}

.c1st-cal-prev,
.c1st-cal-next {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
}

.c1st-cal-prev:hover,
.c1st-cal-next:hover {
    background: rgba(255,255,255,0.2);
}

.c1st-cal-prev:disabled,
.c1st-cal-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.c1st-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    padding: 10px 8px 6px;
    border-bottom: 1px solid #f1f5f9;
}

.c1st-cal-weekdays span {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
}

.c1st-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 8px;
    gap: 4px;
}

.c1st-cal-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    background: none;
    color: #1e293b;
    padding: 0;
}

.c1st-cal-day:hover:not(.disabled):not(.selected) {
    background: #eff6ff;
    color: #1e40af;
}

.c1st-cal-day.today:not(.selected) {
    border: 2px solid #1e40af;
    font-weight: 700;
}

.c1st-cal-day.selected {
    background: #1e40af;
    color: #fff;
    font-weight: 700;
}

.c1st-cal-day.disabled {
    color: #d1d5db;
    cursor: not-allowed;
}

.c1st-cal-day.full {
    color: #fca5a5;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Danish public holiday — closed */
.c1st-cal-day.c1st-holiday {
    color: #d1d5db;
    cursor: not-allowed;
    position: relative;
}

.c1st-cal-day.other-month {
    visibility: hidden;
}

/* Capacity badge on calendar days */
.c1st-cal-cap {
    display: block;
    font-size: 9px;
    font-weight: 400;
    color: #64748b;
    line-height: 1;
    margin-top: -2px;
}

.c1st-cal-day.selected .c1st-cal-cap {
    color: rgba(255,255,255,0.7);
}

.c1st-selected-date-label {
    margin-top: 12px;
    font-size: 14px;
    color: #475569;
    text-align: center;
    padding: 8px;
    background: #eff6ff;
    border-radius: 8px;
}

.c1st-selected-date-label strong {
    color: #1e40af;
}

/* Summary */
.c1st-summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
}

.c1st-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.c1st-summary-row:last-child {
    border-bottom: none;
}

.c1st-summary-row span {
    color: #64748b;
}

.c1st-summary-row strong {
    color: #0f172a;
    text-align: right;
    max-width: 60%;
}

.c1st-confirm-note {
    font-size: 13px;
    color: #64748b;
    text-align: center;
    margin: 20px 0;
    line-height: 1.6;
}

/* Success Panel */
.c1st-success-panel {
    text-align: center;
    padding: 40px 20px;
}

.c1st-success-icon {
    width: 64px;
    height: 64px;
    background: #16a34a;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px;
}

.c1st-success-panel h3 {
    text-align: center;
}

.c1st-success-panel p {
    color: #475569;
    line-height: 1.6;
}

/* Error */
.c1st-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
}

/* Loading spinner */
.c1st-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-top-color: #1e40af;
    border-radius: 50%;
    animation: c1stSpin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

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

/* ── Responsive: tablets and small screens ────────────────── */
@media (max-width: 640px) {
    .c1st-booking {
        padding: 0 12px;
    }

    .c1st-panel h3 {
        font-size: 19px;
        margin-bottom: 18px;
    }

    /* Steps: hide connecting line, tighten spacing */
    .c1st-steps {
        gap: 0;
        margin-bottom: 24px;
    }

    .c1st-steps::before {
        left: 24px;
        right: 24px;
    }

    .c1st-step {
        font-size: 12px;
    }

    .c1st-step span {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    /* Inputs: 16px prevents iOS auto-zoom */
    .c1st-field input[type="text"],
    .c1st-field input[type="email"],
    .c1st-field input[type="tel"],
    .c1st-field input[type="date"],
    .c1st-field select,
    .c1st-field textarea {
        font-size: 16px;
        padding: 12px;
    }

    .c1st-phone-row {
        flex-direction: column;
    }

    .c1st-phone-row .c1st-btn-secondary {
        width: 100%;
    }

    /* Buttons: larger touch targets */
    .c1st-btn {
        padding: 14px 24px;
        font-size: 16px;
        min-height: 48px;
    }

    /* Nav: stack on small screens */
    .c1st-nav {
        flex-direction: column-reverse;
        gap: 10px;
        margin-top: 24px;
    }

    .c1st-nav .c1st-btn {
        width: 100%;
        text-align: center;
    }

    .c1st-nav .c1st-btn-next,
    .c1st-nav .c1st-btn-primary {
        margin-left: 0;
    }

    /* Service categories */
    .c1st-category-header {
        padding: 12px 14px;
    }

    .c1st-category-title {
        font-size: 14px;
    }

    .c1st-service-item {
        padding: 12px 10px;
        gap: 10px;
    }

    .c1st-service-item input[type="checkbox"] {
        width: 22px;
        height: 22px;
        margin-top: 1px;
    }

    /* Calendar */
    .c1st-cal-header {
        padding: 12px;
    }

    .c1st-cal-title {
        font-size: 15px;
    }

    .c1st-cal-weekdays {
        padding: 8px 4px 4px;
    }

    .c1st-cal-weekdays span {
        font-size: 11px;
    }

    .c1st-cal-days {
        padding: 4px;
        gap: 2px;
    }

    .c1st-cal-day {
        font-size: 14px;
        min-height: 40px;
    }

    /* Summary */
    .c1st-summary {
        padding: 16px;
    }

    .c1st-summary-row {
        flex-direction: column;
        gap: 2px;
    }

    .c1st-summary-row strong {
        text-align: left;
        max-width: 100%;
    }

    /* Success */
    .c1st-success-panel {
        padding: 32px 16px;
    }
}

/* ── Responsive: very small phones ───────────────────────── */
@media (max-width: 380px) {
    .c1st-booking {
        padding: 0 8px;
    }

    /* Hide step labels, show only numbers */
    .c1st-step {
        font-size: 0;
        gap: 0;
    }

    .c1st-step span {
        font-size: 13px;
        width: 30px;
        height: 30px;
    }

    .c1st-step.active,
    .c1st-step.done {
        font-size: 0;
    }

    .c1st-steps::before {
        top: 15px;
        left: 20px;
        right: 20px;
    }

    .c1st-panel h3 {
        font-size: 17px;
    }

    .c1st-cal-day {
        font-size: 13px;
        min-height: 36px;
    }
}
