/**
 * Danmission Booking — 4-trins formular
 * Primærfarve: #4a7c59 (Danmission grøn)
 * Accent: #3a6347
 */

/* ================================================================
   Reset & base
   ================================================================ */
.dm-booking *,
.dm-booking *::before,
.dm-booking *::after {
    box-sizing: border-box;
}

.dm-booking {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #1a2b4a;
    max-width: 720px;
    margin: 0 auto;
    padding: 0;
}

.dm-booking-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    padding: 32px;
    margin-top: 24px;
}

/* ================================================================
   Step Indicator
   ================================================================ */
.dm-steps-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 16px;
}

.dm-step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.dm-step-dot__num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #718096;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.dm-step-dot__label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.dm-step-dot--active .dm-step-dot__num {
    background: #4a7c59;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(74, 124, 89, 0.2);
}

.dm-step-dot--active .dm-step-dot__label {
    color: #4a7c59;
}

.dm-step-dot--completed .dm-step-dot__num {
    background: #4a7c59;
    color: #ffffff;
}

.dm-step-connector {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 0 8px;
    position: relative;
    top: -12px;
    z-index: 1;
    transition: background 0.3s ease;
}

.dm-step-connector--active {
    background: #4a7c59;
}

/* ================================================================
   Step visibility
   ================================================================ */
.dm-step {
    display: none;
    animation: dm-fade-in 0.3s ease;
}

.dm-step--active {
    display: block;
}

@keyframes dm-fade-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================================================
   Step header
   ================================================================ */
.dm-step__title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a2b4a;
    margin: 0 0 12px;
    line-height: 1.2;
}

.dm-step__desc {
    color: #4a5568;
    margin-bottom: 24px;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* ================================================================
   Back button
   ================================================================ */
.dm-back-btn {
    background: none;
    border: none;
    padding: 0;
    color: #4a7c59;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.dm-back-btn:hover {
    color: #3a6347;
}

/* ================================================================
   Form fields
   ================================================================ */
.dm-field {
    margin-bottom: 20px;
}

.dm-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 0;
}

.dm-field-row .dm-field {
    margin-bottom: 20px;
}

.dm-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a2b4a;
    margin-bottom: 8px;
}

.dm-required {
    color: #e53e3e;
    margin-left: 2px;
}

.dm-input,
.dm-select,
.dm-textarea {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #cbd5e0;
    border-radius: 8px;
    font-size: 1rem;
    color: #1a2b4a;
    background: #f8fafc;
    transition: all 0.2s ease;
    outline: none;
    line-height: 1.5;
    font-family: inherit;
}

.dm-textarea {
    resize: vertical;
    min-height: 100px;
}

.dm-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.dm-input:hover,
.dm-select:hover,
.dm-textarea:hover {
    border-color: #a0aec0;
}

.dm-input:focus,
.dm-select:focus,
.dm-textarea:focus {
    border-color: #4a7c59;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.15);
}

.dm-input[aria-invalid="true"],
.dm-select[aria-invalid="true"],
.dm-textarea[aria-invalid="true"] {
    border-color: #e53e3e;
    background: #fff5f5;
}

.dm-input[aria-invalid="true"]:focus,
.dm-select[aria-invalid="true"]:focus,
.dm-textarea[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.15);
}

/* ================================================================
   Dynamic Amelia Fields
   ================================================================ */
.dm-field--dynamic {
    margin-bottom: 20px;
    padding-top: 8px;
    border-top: 1px solid #edf2f7;
}

.dm-field--dynamic:first-child {
    border-top: none;
    padding-top: 0;
}

.dm-checkbox-group,
.dm-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dm-checkbox-item,
.dm-radio-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.dm-checkbox-item input[type="checkbox"],
.dm-radio-item input[type="radio"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: #4a7c59;
    cursor: pointer;
}

.dm-checkbox-item span,
.dm-radio-item span {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.4;
}

/* ================================================================
   Address suggestions autocomplete
   ================================================================ */
.dm-autocomplete-wrap {
    position: relative;
}

.dm-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    list-style: none;
    margin: 0;
    padding: 8px 0;
    z-index: 1000;
    max-height: 280px;
    overflow-y: auto;
}

.dm-suggestions li {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #1a2b4a;
    transition: background 0.15s;
}

.dm-suggestions li:hover,
.dm-suggestions li.dm-suggestion--active {
    background: #f0fdf4;
    color: #4a7c59;
    font-weight: 500;
}

/* ================================================================
   Buttons
   ================================================================ */
.dm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1;
}

.dm-btn:active {
    transform: scale(0.98);
}

.dm-btn--primary {
    background: #4a7c59;
    color: #ffffff;
    border-color: #4a7c59;
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.25);
}

.dm-btn--primary:hover:not(:disabled) {
    background: #3a6347;
    border-color: #3a6347;
    box-shadow: 0 6px 16px rgba(74, 124, 89, 0.35);
}

.dm-btn--primary:disabled {
    background: #cbd5e0;
    border-color: #cbd5e0;
    color: #718096;
    cursor: not-allowed;
    box-shadow: none;
}

.dm-btn--full {
    width: 100%;
}

.dm-step-actions {
    margin-top: 32px;
}

/* ================================================================
   Address summary (trin 2)
   ================================================================ */
#dm-address-summary {
    font-size: 0.95rem;
    color: #4a5568;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #4a7c59;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ================================================================
   Slot-picker
   ================================================================ */
.dm-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.dm-month-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a2b4a;
    flex: 1;
    text-align: center;
    text-transform: capitalize;
}

.dm-month-btn {
    background: #ffffff;
    border: 1.5px solid #cbd5e0;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    color: #4a5568;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.dm-month-btn:hover:not(:disabled) {
    border-color: #4a7c59;
    color: #4a7c59;
    background: #f0fdf4;
}

.dm-month-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dm-slot-day {
    margin-bottom: 32px;
}

.dm-slot-day-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a2b4a;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #edf2f7;
    text-transform: capitalize;
}

.dm-slot-times {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 12px;
}

.dm-slot-btn {
    padding: 12px 8px;
    border: 1.5px solid #cbd5e0;
    border-radius: 8px;
    background: #ffffff;
    color: #4a5568;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.dm-slot-btn:hover {
    border-color: #4a7c59;
    color: #4a7c59;
    background: #f0fdf4;
}

.dm-slot-btn:active {
    transform: scale(0.96);
}

.dm-slot-btn--selected {
    background: #4a7c59;
    border-color: #4a7c59;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.25);
}

.dm-slot-btn--selected:hover {
    background: #3a6347;
    border-color: #3a6347;
    color: #ffffff;
}

.dm-no-slots {
    padding: 32px 24px;
    background: #f8fafc;
    border: 1px dashed #cbd5e0;
    border-radius: 8px;
    color: #718096;
    font-size: 1rem;
    text-align: center;
}

/* ================================================================
   Selected slot summary (trin 3)
   ================================================================ */
.dm-selected-slot-summary {
    margin-bottom: 24px;
}

.dm-slot-summary-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f0fdf4;
    border: 1px solid #c6f6d5;
    border-radius: 8px;
    color: #276749;
    font-weight: 600;
    font-size: 1rem;
}

.dm-slot-summary-icon {
    font-size: 1.2rem;
}

/* ================================================================
   Error messages
   ================================================================ */
.dm-field-error {
    display: block;
    color: #e53e3e;
    font-size: 0.85rem;
    margin-top: 6px;
    font-weight: 500;
}

.dm-form-error {
    padding: 16px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    color: #c53030;
    font-size: 0.95rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dm-form-error::before {
    content: "⚠️";
}

.dm-error-msg {
    padding: 20px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    color: #c53030;
    font-size: 1rem;
    text-align: center;
}

/* ================================================================
   Spinner / loading
   ================================================================ */
.dm-spinner {
    display: block;
    width: 40px;
    height: 40px;
    border: 3px solid #edf2f7;
    border-top-color: #4a7c59;
    border-radius: 50%;
    animation: dm-spin 0.8s linear infinite;
    margin: 40px auto 16px;
}

@keyframes dm-spin {
    to {
        transform: rotate(360deg);
    }
}

.dm-loading-text {
    text-align: center;
    color: #718096;
    font-size: 0.95rem;
    margin: 0 0 40px;
}

/* ================================================================
   Confirmation (trin 4)
   ================================================================ */
.dm-confirmation {
    text-align: center;
    padding: 20px 0;
}

.dm-confirmation__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f0fdf4;
    color: #38a169;
    margin: 0 auto 24px;
    border: 4px solid #c6f6d5;
}

.dm-confirmation__title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a2b4a;
    margin: 0 0 12px;
}

.dm-confirmation__msg {
    font-size: 1.1rem;
    color: #4a5568;
    margin: 0 0 32px;
}

.dm-confirmation__details {
    text-align: left;
    max-width: 480px;
    margin: 0 auto;
}

.dm-confirmation__list {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin: 0 0 20px;
}

.dm-confirmation__item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
}

.dm-confirmation__item:first-child {
    padding-top: 0;
}

.dm-confirmation__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dm-confirmation__item dt {
    font-size: 0.85rem;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dm-confirmation__item dd {
    margin: 0;
    color: #1a2b4a;
    font-size: 1.05rem;
    font-weight: 500;
    word-break: break-word;
}

.dm-confirmation__booking-id {
    text-align: center;
    font-size: 0.9rem;
    color: #a0aec0;
    margin: 16px 0 0;
}

/* ================================================================
   New Booking Fields (Step 3)
   ================================================================ */
.dm-field-section {
    margin-top: 24px;
    padding: 16px 0;
    border-top: 1px solid #edf2f7;
}

.dm-field-section:first-of-type {
    border-top: none;
    padding-top: 0;
}

.dm-field-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a2b4a;
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

/* Organization type checkbox section */
.dm-org-type-section {
    margin: 24px 0;
    padding: 12px;
    background: #f7fafb;
    border-radius: 8px;
}

.dm-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.dm-checkbox-wrapper input[type="checkbox"] {
    margin-top: 3px;
    cursor: pointer;
    accent-color: #4a7c59;
}

.dm-checkbox-label {
    font-size: 0.95rem;
    color: #1a2b4a;
    line-height: 1.4;
}

/* ================================================================
   Pricing Card (Step 3)
   ================================================================ */
.dm-pricing-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
    overflow: hidden;
}

.dm-pricing-card__paid-section {
    padding: 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.dm-pricing-card__paid-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.dm-pricing-card__icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #e2e8f0;
    color: #4a5568;
    border-radius: 12px;
    flex-shrink: 0;
}

.dm-pricing-card__title-wrap {
    flex: 1;
}

.dm-pricing-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a2b4a;
    margin: 0 0 4px 0;
}

.dm-pricing-card__price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #4a7c59;
    line-height: 1;
}

.dm-pricing-card__tax {
    font-size: 0.9rem;
    font-weight: 500;
    color: #718096;
}

.dm-pricing-card__desc {
    margin: 0;
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.5;
    padding-left: 64px; /* Aligns with text, skipping icon */
}

.dm-pricing-card__free-section {
    padding: 24px;
    background: #ffffff;
}

.dm-pricing-card__free-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.dm-pricing-card__free-badge {
    display: inline-block;
    background: #f0fdf4;
    color: #276749;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #c6f6d5;
}

.dm-pricing-card__free-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a2b4a;
    margin: 0;
}

.dm-pricing-card__free-desc {
    margin: 0 0 20px 0;
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Custom Checkbox for Free Org */
.dm-free-org-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.dm-free-org-checkbox:hover {
    border-color: #cbd5e0;
    background: #f1f5f9;
}

.dm-free-org-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.dm-free-org-checkbox__box {
    position: relative;
    display: inline-block;
    width: 22px;
    height: 22px;
    background: #ffffff;
    border: 2px solid #cbd5e0;
    border-radius: 6px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    margin-top: 2px;
}

.dm-free-org-checkbox:hover input ~ .dm-free-org-checkbox__box {
    border-color: #a0aec0;
}

.dm-free-org-checkbox input:checked ~ .dm-free-org-checkbox__box {
    background-color: #4a7c59;
    border-color: #4a7c59;
}

.dm-free-org-checkbox__box:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.dm-free-org-checkbox input:checked ~ .dm-free-org-checkbox__box:after {
    display: block;
}

.dm-free-org-checkbox input:focus-visible ~ .dm-free-org-checkbox__box {
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.25);
}

.dm-free-org-checkbox__text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a2b4a;
    line-height: 1.4;
}

.dm-free-org-checkbox input:checked ~ .dm-free-org-checkbox__text {
    color: #4a7c59;
}

@media (max-width: 600px) {
    .dm-pricing-card__desc {
        padding-left: 0;
        margin-top: 16px;
    }
    
    .dm-pricing-card__free-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Invoice information section */
.dm-invoice-section {
    margin-top: 24px;
    padding: 16px 0;
    border-top: 1px solid #edf2f7;
}

.dm-invoice-section--optional {
    opacity: 0.6;
    pointer-events: none;
}

.dm-invoice-required {
    color: #e53e3e;
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 600px) {
    .dm-booking-container {
        padding: 24px 16px;
        border-radius: 0;
        box-shadow: none;
        border-top: 1px solid #edf2f7;
        border-bottom: 1px solid #edf2f7;
    }

    .dm-steps-indicator {
        padding: 0 8px;
    }

    .dm-step-dot__label {
        display: none;
        /* Skjul labels på mobil for at spare plads */
    }

    .dm-step-connector {
        top: 0;
        /* Juster connector når labels er skjult */
    }

    .dm-step__title {
        font-size: 1.5rem;
    }

    .dm-field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .dm-slot-times {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .dm-confirmation__title {
        font-size: 1.75rem;
    }
}