/* Tiny Stars registration UI — adapted from Kids Planet registration styles */

@import url('https://fonts.googleapis.com/css2?family=Sacramento&display=swap');

:root {
    /* Kids Planet roles → Tiny Stars values */
    --reg-primary: #642a73;   /* KP #202f84 — script, notes, buttons, focus */
    --reg-ink: #1b0238;       /* KP #1b0238 — titles, labels (same) */
    --reg-accent: #f2a807;
    --reg-muted: #5a4a62;     /* KP #445171 */
    --reg-surface: #faf7fb;
    --reg-border: #e8e0ed;
    --reg-chip: #f3ecf6;
    --reg-success-bg: #e8f7ee;
    --reg-success-text: #1d7a3f;
    --reg-success-border: #9ed8b3;
    --reg-danger: #dc3545;
}

/* Card + primary button (Kids Planet quote-item / default-btn, Tiny Stars colors) */
.quote-area {
    background-color: #f8f8f8;
}

/*
 * Section spacing — match Kids Planet measured dimensions:
 * desktop pt/pb = 100px; tablet = 70px; mobile = 50px.
 * (Wide-screen side gaps ~588px come from col-xl-7 centering, not padding.)
 */
section.quote-area.pt-100 {
    padding-top: 100px;
}

section.quote-area.pb-100 {
    padding-bottom: 100px;
}

.pt-100 {
    padding-top: 100px;
}

.pb-100 {
    padding-bottom: 100px;
}

/* Tablet — same as Kids Planet responsive.css */
@media only screen and (min-width: 768px) and (max-width: 991px) {
    section.quote-area.pt-100,
    .pt-100 {
        padding-top: 70px;
    }

    section.quote-area.pb-100,
    .pb-100 {
        padding-bottom: 70px;
    }
}

/* Mobile — same as Kids Planet responsive.css */
@media only screen and (max-width: 767px) {
    section.quote-area.pt-100,
    .pt-100 {
        padding-top: 50px;
    }

    section.quote-area.pb-100,
    .pb-100 {
        padding-bottom: 50px;
    }
}

.quote-item {
    background-color: #fff;
    box-shadow: 0 2px 28px 0 rgba(0, 0, 0, 0.09);
    padding: 50px;
    border-radius: 0;
    border: 0;
}

/* Kids Planet signature look: Sacramento script eyebrow */
.quote-item .content span {
    display: inline-block;
    font-size: 20px;
    color: var(--reg-primary); /* KP uses primary, not gold */
    font-weight: 600;
    font-family: Sacramento, cursive;
    letter-spacing: 0;
    margin-bottom: 0;
}

.quote-item .content h3 {
    color: var(--reg-ink) !important;
    font-family: Catamaran, sans-serif !important;
    font-weight: 700 !important;
    font-size: 45px !important;
    line-height: 1.15;
    margin-top: 20px;
    margin-bottom: 20px;
}

.quote-item form .form-group {
    margin-bottom: 15px;
}

.quote-item form .form-group .form-control {
    height: 70px;
    color: var(--reg-ink);
    box-shadow: unset !important;
    border: 1px solid #eee;
    background-color: transparent;
    transition: 0.5s;
    border-radius: 10px;
    padding: 0 15px;
    font-weight: 500;
}

.quote-item form .form-group .form-control::placeholder {
    color: #7e7e7e;
    transition: 0.5s;
}

.quote-item form .form-group .form-control:focus {
    border-color: var(--reg-primary);
    background-color: transparent;
}

.quote-item form .form-group .form-control:focus::placeholder {
    color: transparent;
}

.default-btn {
    padding: 12px 35px;
    font-size: 16px;
    z-index: 1;
    position: relative;
    display: inline-block;
    overflow: hidden;
    background-color: var(--reg-primary);
    color: #fff !important;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    transition: 0.5s;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.default-btn:hover,
.default-btn:focus {
    background-color: var(--reg-ink);
    color: #fff !important;
}

.quote-item form .default-btn {
    border: none;
    width: 100%;
    cursor: pointer;
    margin-top: 10px;
    padding: 15px 30px;
}

/* ——— Confirm payment ——— */
.confirm-payment-wrapper {
    padding: 35px 30px;
}

.confirm-payment-note,
.registration-note {
    margin-top: 10px;
    color: var(--reg-primary);
    font-weight: 600;
    font-size: 16px;
    line-height: 1.6;
}

.confirm-payment-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--reg-ink);
}

.confirm-payment-wrapper form .form-group .form-control,
.registration-wrapper form .form-group .form-control {
    height: 52px !important;
    font-size: 15px;
    padding: 10px 14px !important;
}

.confirm-payment-radio-group {
    margin-top: 6px;
}

.confirm-payment-radio-options {
    display: grid;
    gap: 10px;
    margin-top: 8px;
}

/* Plain radios like Kids Planet — no boxed tiles */
.confirm-payment-radio-group .form-check {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    padding-left: 0;
    margin-bottom: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.confirm-payment-radio-group .form-check-input {
    position: static;
    margin: 2px 0 0;
    width: 18px;
    height: 18px;
    border: 1px solid #c9cfdf;
    flex: 0 0 auto;
}

.confirm-payment-radio-group .form-check-input:checked {
    background-color: var(--reg-primary);
    border-color: var(--reg-primary);
}

.confirm-payment-radio-label {
    font-size: 15px;
    line-height: 1.45;
    color: var(--reg-ink);
    font-weight: 600;
    margin: 0;
}

.confirm-payment-radio-group.is-invalid .confirm-payment-radio-label {
    color: #842029;
}

.confirm-payment-radio-group .field-error-text {
    flex-basis: 100%;
    width: 100%;
    margin-left: 0;
    margin-top: 8px;
}

.confirm-payment-wrapper .form-control.is-invalid,
.confirm-payment-wrapper .form-control.is-invalid:focus,
.registration-wrapper .form-control.is-invalid,
.registration-wrapper .form-control.is-invalid:focus {
    border: 1px solid var(--reg-danger) !important;
    border-color: var(--reg-danger) !important;
    background-image: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.field-error-text {
    display: none;
    color: var(--reg-danger);
    font-size: 13px;
    margin-top: 6px;
    line-height: 1.3;
}

.registration-wrapper .form-group.is-invalid > .field-error-text,
.registration-wrapper .mb-3.is-invalid > .field-error-text,
.registration-wrapper .signature-pad-wrapper.is-invalid + .field-error-text,
.registration-wrapper .registration-submit-error {
    display: block;
}

.registration-wrapper .registration-submit-error {
    width: 100%;
    margin-top: 10px;
    text-align: right;
}

.confirm-payment-success-modal-content,
.registration-success-modal-content,
.registration-used-card {
    border-radius: 16px;
    border: 0;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(100, 42, 115, 0.16);
}

.confirm-payment-success-modal-header,
.registration-success-modal-header {
    background: linear-gradient(90deg, var(--reg-primary) 0%, var(--reg-ink) 100%);
    color: #fff;
    border-bottom: 0;
    padding: 14px 18px;
}

.confirm-payment-success-modal-header .modal-title,
.registration-success-modal-header .modal-title {
    color: #fff;
    font-weight: 700;
    margin: 0;
}

.confirm-payment-success-modal-header .btn-close,
.registration-success-modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.confirm-payment-success-modal-body,
.registration-success-modal-body {
    text-align: center;
    padding: 24px 22px 16px;
}

.confirm-payment-success-icon-wrap,
.registration-success-icon-wrap {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--reg-success-bg);
    border: 2px solid var(--reg-success-border);
}

.confirm-payment-success-icon,
.registration-success-icon {
    color: var(--reg-success-text);
    font-size: 30px;
    line-height: 1;
    font-weight: 700;
}

.confirm-payment-success-title,
.registration-success-title {
    margin-bottom: 8px;
    color: var(--reg-ink);
}

.confirm-payment-success-text,
.registration-success-text {
    color: var(--reg-muted);
    font-size: 15px;
}

.confirm-payment-success-modal-footer,
.registration-success-modal-footer {
    border-top: 0;
    justify-content: center;
    padding: 0 22px 22px;
}

#confirmPaymentSubmitBtn {
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative;
    z-index: 2;
    width: 100%;
}

/* ——— Multi-step form ——— */
.registration-wrapper {
    padding: 35px 30px;
}

.registration-datetime-wrap {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
}

.registration-datetime-wrap input[type="date"].form-control,
.registration-datetime-wrap input[type="time"].form-control {
    width: 100%;
    position: relative;
    background-color: #fff !important;
    padding-right: 2.75rem !important;
    color-scheme: light;
    cursor: pointer;
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px 18px;
}

.registration-datetime-wrap input[type="date"].form-control {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23642a73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
}

.registration-datetime-wrap input[type="time"].form-control {
    -webkit-appearance: auto;
    appearance: auto;
    background-image: none;
}

.registration-datetime-wrap--time::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23642a73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 2;
}

.registration-datetime-wrap input[type="date"].form-control::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
}

.registration-datetime-wrap input[type="time"].form-control::-webkit-calendar-picker-indicator {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
    background: transparent;
    color: transparent;
}

.registration-wrapper .flatpickr-calendar {
    z-index: 1050;
}

.registration-wrapper .flatpickr-time input.flatpickr-hour,
.registration-wrapper .flatpickr-time input.flatpickr-minute {
    font-size: 15px;
}

.registration-wrapper .registration-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--reg-ink);
}

.registration-wrapper form .form-group textarea.form-control {
    height: auto;
    min-height: 120px;
    padding-top: 12px;
}

.registration-stepper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    flex-wrap: nowrap;
    margin: 8px 0 10px;
    padding: 6px 2px 4px;
}

.step-progress-track {
    position: absolute;
    left: 18px;
    right: 18px;
    top: 50%;
    height: 3px;
    background: #e8dcef;
    transform: translateY(-50%);
    z-index: 0;
    border-radius: 999px;
    pointer-events: none;
}

.step-progress-fill {
    height: 100%;
    width: 0;
    background: var(--reg-primary);
    border-radius: 999px;
    transition: width 0.25s ease;
}

.step-node {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    border: 0 !important;
    border-radius: 50% !important;
    background: #efe6f2 !important;
    color: #1b0238 !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    box-shadow: none !important;
    transform: none !important;
    font-variant-numeric: tabular-nums;
}

.step-node.completed,
.step-node.active {
    background: var(--reg-primary) !important;
    color: #fff !important;
}

.step-node.active {
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--reg-primary) !important;
}

.step-node:hover,
.step-node:focus {
    transform: none !important;
    box-shadow: none !important;
}

.step-node.active:hover,
.step-node.active:focus {
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--reg-primary) !important;
}

.step-current-label {
    margin: 0 0 18px;
    color: var(--reg-primary);
    font-size: 14px;
    font-weight: 700;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.step-title {
    margin-bottom: 16px;
    color: var(--reg-ink);
}

.registration-emergency-card {
    background: var(--reg-surface);
    border: 1px solid var(--reg-border);
    border-radius: 12px;
    padding: 1.15rem 1rem 0.85rem;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .registration-emergency-card {
        padding: 1.35rem 1.35rem 1rem;
    }
}

.emergency-person-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--reg-muted);
    letter-spacing: 0.01em;
}

.emergency-step-divider {
    border-top: 1px solid var(--reg-border);
    margin-top: 1.5rem;
    padding-top: 1.25rem;
}

.authorized-pickup-person-row {
    border-bottom: 1px solid var(--reg-border) !important;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

#authorizedPickupRows .authorized-pickup-person-row:last-child {
    border-bottom: none !important;
    margin-bottom: 0;
    padding-bottom: 0;
}

#authorizedPickupRowsWrap {
    padding-bottom: 0.5rem;
}

#addAnotherAuthorizedPickupBtn {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.step-actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.step-actions .btn {
    min-width: 120px;
}

.signature-pad-wrapper {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 0;
    background: #fff;
    overflow: hidden;
    position: relative;
}

.signature-pad-wrapper.is-invalid {
    border: 1px solid var(--reg-danger) !important;
}

.signature-pad-wrapper.signature-pad-staff-locked {
    background: #f7f5f8;
    border-style: dashed;
    border-color: #d4c8dc;
    pointer-events: none;
    user-select: none;
}

.signature-pad-wrapper.signature-pad-staff-locked .signature-pad {
    cursor: not-allowed;
    background: #f7f5f8;
}

.signature-pad-wrapper.signature-pad-staff-locked .signature-pad-placeholder {
    display: flex;
    color: #7a6a85;
}

.staff-signature-note {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #6b5a73;
    line-height: 1.4;
}

.signature-pad {
    width: 100%;
    height: 200px;
    border: none;
    border-radius: 0;
    display: block;
    touch-action: none;
    cursor: crosshair;
    background: #fff;
    position: relative;
    z-index: 1;
}

.signature-pad-wrapper.signature-pad-initial .signature-pad {
    height: 200px;
}

.signature-pad-caption {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--reg-ink);
    margin: 8px 10px 6px;
}

.signature-pad-placeholder {
    position: absolute;
    left: 50%;
    top: 44%;
    transform: translate(-50%, -50%);
    color: #a894b3;
    font-size: 14px;
    font-style: italic;
    pointer-events: none;
    user-select: none;
    opacity: 0.9;
    transition: opacity 0.15s ease;
    z-index: 2;
}

.signature-pad-wrapper.has-signature .signature-pad-placeholder {
    opacity: 0;
    visibility: hidden;
}

.signature-clear-btn {
    margin: 0;
    width: 100%;
    text-align: right;
    padding: 6px 12px;
    border-top: 1px solid #eee;
    background: transparent;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    color: var(--reg-primary);
    font-weight: 700;
    font-size: 13px;
    text-decoration: underline;
    line-height: 1.4;
    cursor: pointer;
}

.registration-success-points {
    display: grid;
    gap: 8px;
    text-align: left;
}

.registration-success-point {
    background: var(--reg-surface);
    border: 1px solid var(--reg-border);
    color: var(--reg-ink);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
}

.registration-success-link {
    color: var(--reg-ink);
    font-weight: 600;
    text-decoration: underline;
}

.registration-success-link:hover,
.registration-success-link:focus {
    color: var(--reg-accent);
}

.registration-not-highlight {
    background: #ffe566;
    padding: 0 0.15rem;
    font-weight: 700;
}

.registration-used-card {
    background: #fff;
    padding: 48px 36px;
    text-align: center;
}

.registration-used-card h3 {
    color: var(--reg-ink);
    margin-bottom: 12px;
}

.registration-used-card p {
    color: var(--reg-muted);
    margin-bottom: 0;
}

.registration-welcome-letter ul,
.registration-signature-pack,
.registration-aggressive-behavior,
.registration-food-services,
.registration-contract {
    color: var(--reg-ink);
}

.registration-welcome-letter p,
.registration-signature-pack p,
.registration-aggressive-behavior p,
.registration-aggressive-behavior li,
.registration-contract p,
.registration-contract li {
    line-height: 1.65;
}

/*
 * Theme sets ul/ol { padding-left: 0 }, which leaves markers hanging and
 * list text misaligned vs paragraphs. Keep markers in a fixed gutter and
 * align list text with surrounding body copy.
 */
.registration-wrapper ul,
.registration-wrapper ol,
.registration-welcome-letter ul,
.registration-aggressive-behavior ol,
.registration-contract ul {
    margin: 0 0 1rem;
    padding-left: 1.35rem;
    list-style-position: outside;
}

.registration-wrapper ul {
    list-style-type: disc;
}

.registration-wrapper ol {
    list-style-type: decimal;
}

.registration-wrapper ul li,
.registration-wrapper ol li,
.registration-welcome-letter ul li,
.registration-aggressive-behavior ol li,
.registration-contract ul li {
    margin: 0 0 0.55rem;
    padding-left: 0.35rem;
}

.registration-wrapper ul li:last-child,
.registration-wrapper ol li:last-child,
.registration-welcome-letter ul li:last-child,
.registration-aggressive-behavior ol li:last-child,
.registration-contract ul li:last-child {
    margin-bottom: 0;
}

@media (max-width: 767.98px) {
    .quote-item,
    .confirm-payment-wrapper,
    .registration-wrapper {
        padding: 28px 18px;
    }

    .confirm-payment-wrapper .content h3,
    .registration-wrapper .content h3 {
        font-size: 28px !important;
        line-height: 1.2;
        margin-top: 12px;
        margin-bottom: 12px;
    }

    .quote-item .content span {
        font-size: 18px;
    }

    .confirm-payment-note,
    .registration-note {
        font-size: 14px;
    }

    .registration-stepper {
        justify-content: flex-start;
        gap: 12px;
        margin-bottom: 8px;
        padding: 10px 4px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .step-progress-track {
        display: none;
    }

    .step-node {
        width: 28px;
        height: 28px;
        font-size: 12px;
        flex-shrink: 0;
    }

    .step-node.active {
        box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--reg-primary);
    }

    .step-current-label {
        font-size: 13px;
        margin-bottom: 14px;
    }

    .step-title {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .confirm-payment-wrapper form .form-group .form-control,
    .registration-wrapper form .form-group .form-control {
        height: 48px;
        font-size: 14px;
        padding: 9px 12px;
    }

    .confirm-payment-label,
    .registration-wrapper .registration-label,
    .registration-wrapper .mb-2 {
        font-size: 13px !important;
        margin-bottom: 5px !important;
    }

    .registration-wrapper form .form-group textarea.form-control {
        min-height: 100px;
        padding-top: 10px;
    }

    .signature-pad,
    .signature-pad-wrapper.signature-pad-initial .signature-pad {
        height: 165px;
    }

    .signature-clear-btn {
        font-size: 12px;
        padding: 5px 10px;
    }

    .step-actions {
        margin-top: 18px;
        gap: 8px;
        justify-content: stretch;
    }

    .step-actions .btn {
        min-width: 0;
        width: 100% !important;
        height: 54px;
        box-sizing: border-box;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .step-actions #nextStepBtn,
    .step-actions #submitBtn {
        order: 1;
    }

    .step-actions #prevStepBtn {
        order: 2;
    }

    .confirm-payment-success-modal-body,
    .registration-success-modal-body {
        padding: 20px 16px 12px;
    }

    .confirm-payment-success-title,
    .registration-success-title {
        font-size: 24px;
    }

    .confirm-payment-success-text,
    .registration-success-text {
        font-size: 14px;
    }

    .registration-success-point {
        font-size: 13px;
    }
}

/* Submit button loading state */
.registration-wrapper #submitBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 180px;
}

.registration-wrapper #submitBtn .registration-submit-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: registration-submit-spin 0.7s linear infinite;
    flex-shrink: 0;
}

.registration-wrapper #submitBtn.is-loading .registration-submit-spinner {
    display: inline-block;
}

.registration-wrapper #submitBtn.is-loading,
.registration-wrapper #submitBtn:disabled {
    opacity: 0.85;
    cursor: not-allowed;
    transform: none;
    pointer-events: none;
}

@keyframes registration-submit-spin {
    to {
        transform: rotate(360deg);
    }
}
