:root {
    --qc-brand: #048324;
    --qc-brand-deep: #036019;
    --qc-red: #e42228;
    --qc-ink: #23291f;
    --qc-ink-soft: #6b756f;
    --qc-line: #e3e7e4;
    --qc-paper: #fafcfb;
}



/* Demo launcher — stand-in for wherever this modal is triggered from
      (a header CTA, a floating button, a card in request-home-care.html, etc.) */
.qc-launch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 28px;
    border: none;
    border-radius: 26px;
    background: var(--qc-brand);
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: 0.2s ease;
}

.qc-launch:hover {
    background: var(--qc-brand-deep);
    transform: translateY(-2px);
}

/* =========================================
      OVERLAY
   ========================================= */

.qc-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(20, 26, 22, 0.55);

    opacity: 0;
    visibility: hidden;

    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.qc-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* =========================================
      MODAL CARD
   ========================================= */

.qc-modal {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;

    padding: 38px 40px 34px;

    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);

    transform: translateY(16px) scale(0.98);
    transition: transform 0.25s ease;
}

.qc-overlay.is-open .qc-modal {
    transform: translateY(0) scale(1);
}

.qc-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    border: none;
    border-radius: 50%;

    background: #f4f6f5;
    color: var(--qc-ink-soft);

    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.qc-modal-close:hover {
    background: #e3e7e4;
    color: var(--qc-ink);
}

.qc-modal-close svg {
    width: 13px;
    height: 13px;
}

/* Header */

.qc-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 8px;
}

.qc-modal-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;
    background: #eef8f1;
    color: var(--qc-brand);
}

.qc-modal-icon svg {
    width: 21px;
    height: 21px;
}

.qc-modal-header-text span {
    display: block;
    margin-bottom: 6px;
    color: var(--qc-red);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.qc-modal-header-text h2 {
    color: var(--qc-ink);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}

.qc-modal-desc {
    margin: 14px 0 26px;
    color: var(--qc-ink-soft);
    font-size: 13.5px;
    line-height: 1.75;
}

/* =========================================
      FORM GRID / FIELDS
   ========================================= */

.qc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
}

.qc-field {
    margin-bottom: 18px;
}

.qc-field label {
    display: block;
    margin-bottom: 7px;
    color: #444444;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.qc-field label .qc-required {
    color: var(--qc-red);
    margin-left: 2px;
}

.qc-field input,
.qc-field select,
.qc-field textarea {
    width: 100%;
    border: 1px solid var(--qc-line);
    border-radius: 7px;
    background: var(--qc-paper);
    color: var(--qc-ink);
    font-family: inherit;
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

/* .qc-field input { height: 48px; padding: 0 15px; } */
.qc-field input:not([type="checkbox"]) {
    height: 48px;
    padding: 0 15px;
}

.qc-field input::placeholder,
.qc-field textarea::placeholder {
    color: #a5a5a5;
}

.qc-field input:focus,
.qc-field select:focus,
.qc-field textarea:focus {
    border-color: var(--qc-brand);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(4, 131, 36, 0.08);
}

/* Select */

.qc-select-wrap {
    position: relative;
}

.qc-select-wrap select {
    height: 48px;
    padding: 0 34px 0 15px;
    appearance: none;
    cursor: pointer;
}

.qc-select-wrap select:invalid {
    color: #a5a5a5;
}

.qc-select-wrap svg {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    color: var(--qc-ink-soft);
    pointer-events: none;
}

/* Textarea + counter */

.qc-field textarea {
    min-height: 130px;
    padding: 13px 15px;
    line-height: 1.6;
    resize: vertical;
}

.qc-char-count {
    margin-top: 6px;
    text-align: right;
    color: #a5a5a5;
    font-size: 11px;
}

/* =========================================
      SPECIALTY CHECKBOX PILLS
      (shown when "Special Nursing" is selected)
   ========================================= */

.qc-specialty-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.qc-specialty-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 16px;
    padding: 5px 16px;

    border: 1px solid var(--qc-line);
    border-radius: 20px;
    background: var(--qc-paper);

    color: var(--qc-ink-soft);
    font-size: 12.5px;
    font-weight: 600;

    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.qc-specialty-pill:hover {
    border-color: var(--qc-brand);
    color: var(--qc-ink);
}

/* Custom checkbox box — replaces the browser default so it matches the
   rest of this design system instead of looking like a stray OS control. */
.qc-specialty-pill input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    position: relative;

    width: 16px;
    height: 16px;
    margin: 0;

    border: 1.5px solid var(--qc-line);
    border-radius: 4px;
    background: #ffffff;

    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.qc-specialty-pill input[type="checkbox"]:checked {
    border-color: var(--qc-brand);
    background: var(--qc-brand);
}

.qc-specialty-pill input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.qc-specialty-pill input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--qc-brand);
    outline-offset: 2px;
}

/* Highlight the whole pill once its checkbox is checked */
.qc-specialty-pill:has(input:checked) {
    border-color: var(--qc-brand);
    background: #eef8f1;
    color: var(--qc-ink);
}

/* =========================================
      VALIDATION ERROR STATE
   ========================================= */

.qc-field input.is-invalid,
.qc-field select.is-invalid,
.qc-field textarea.is-invalid {
    border-color: var(--qc-red);
}

.qc-field input.is-invalid:focus,
.qc-field select.is-invalid:focus,
.qc-field textarea.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(228, 34, 40, 0.08);
}

.qc-error-text {
    display: block;
    margin-top: 5px;
    color: var(--qc-red);
    font-size: 11.5px;
    line-height: 1.5;
}

/* =========================================
      SUBMIT ROW
   ========================================= */

.qc-form-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 10px;
}

.qc-privacy-note {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #999999;
    font-size: 11px;
}

.qc-privacy-note svg {
    width: 12px;
    height: 12px;
    color: var(--qc-brand);
    flex-shrink: 0;
}

.qc-submit {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;

    padding: 14px 26px;

    border: none;
    border-radius: 6px;

    background: var(--qc-red);
    color: #ffffff;

    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;

    cursor: pointer;
    transition: 0.25s ease;
}

.qc-submit:hover {
    background: #c91c22;
    transform: translateY(-2px);
    box-shadow: 0 7px 18px rgba(228, 34, 40, 0.22);
}

.qc-submit svg {
    width: 13px;
    height: 13px;
}

/* =========================================
      SUCCESS STATE
   ========================================= */

.qc-success {
    display: none;
    text-align: center;
    padding: 14px 0 4px;
}

.qc-modal.is-submitted .qc-form-wrap {
    display: none;
}

.qc-modal.is-submitted .qc-success {
    display: block;
}

.qc-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #eef8f1;
    color: var(--qc-brand);
}

.qc-success-icon svg {
    width: 25px;
    height: 25px;
}

.qc-success h3 {
    margin: 0 0 8px;
    color: var(--qc-ink);
    font-size: 19px;
    font-weight: 700;
}

.qc-success p {
    margin: 0;
    color: var(--qc-ink-soft);
    font-size: 13.5px;
    line-height: 1.7;
}

/* =========================================
      RESPONSIVE
   ========================================= */

@media only screen and (max-width: 560px) {
    .qc-modal {
        padding: 30px 22px 26px;
    }

    .qc-grid {
        grid-template-columns: 1fr;
    }

    .qc-form-bottom {
        flex-direction: column;
        align-items: stretch;
    }

    .qc-submit {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {

    .qc-overlay,
    .qc-modal,
    .qc-submit,
    .qc-launch {
        transition: none;
    }
}