/* =================================================================
   Form extras — additions to the base theme for the wired-up forms.
   Loaded after style.css so these win on conflicts.
   - Theme-aligned status messages (light + dark variants).
   - Visually-hidden honeypot helper for bot protection.
   - Disabled-state polish for buttons.
   - Native input-type coverage (tel, datetime-local, select, etc.)
     because the base theme only styles input[type="text"|"email"].
   - Custom checkbox styling so checkbox rows align with other inputs.
   - Celebratory success card with animated check + confetti.
================================================================= */

.form-status {
    position: relative;
    display: block;
    margin: 18px 0 6px;
    padding: 14px 18px;
    border-radius: var(--thm-bdr-radius);
    font-family: var(--thm-font-two);
    font-size: 16px;
    line-height: 1.5;
    border: 1px solid transparent;
}

.form-status--success {
    color: #0c5e3a;
    background-color: #e6f6ee;
    border-color: #c4e9d4;
}

.form-status--error {
    color: #842029;
    background-color: #fbe3e6;
    border-color: #f1c2c8;
}

/* Dark-background variants — used on the homepage Get-A-Quote section
   and the newsletter strip where the surrounding text is white. */

.form-status--on-dark {
    color: #ffffff;
}

.form-status--on-dark.form-status--success {
    background-color: rgba(34, 139, 87, 0.20);
    border-color: rgba(120, 220, 170, 0.55);
}

.form-status--on-dark.form-status--error {
    background-color: rgba(220, 53, 69, 0.22);
    border-color: rgba(255, 130, 145, 0.55);
}

/* Visually hidden honeypot — invisible to humans, present in DOM
   so naive form-filling bots populate it and trip the server check. */
.honeypot {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Subtle polish on disabled submit buttons so loading state is obvious. */
.thm-btn[disabled],
.btn-one[disabled],
button[type="submit"][disabled] {
    opacity: 0.65;
    cursor: not-allowed;
}


/* =================================================================
   Light-theme contact form inputs (.contact-page-form)
   Covers /contact and /get-a-quote.
   The base theme only styles type=text/email; we extend to all the
   native types these forms actually use.
================================================================= */

.contact-page-form__input-box input[type="tel"],
.contact-page-form__input-box input[type="number"],
.contact-page-form__input-box input[type="url"],
.contact-page-form__input-box input[type="date"],
.contact-page-form__input-box input[type="datetime-local"],
.contact-page-form__input-box input[type="time"],
.contact-page-form__input-box select {
    color: var(--thm-gray);
    font-size: 17px;
    font-weight: 400;
    font-family: var(--thm-font-two);
    width: 100%;
    height: 65px;
    background: #f1f5f9;
    border: 2px solid transparent;
    padding: 0 40px;
    margin-bottom: 30px;
    border-radius: var(--thm-bdr-radius);
    outline: none;
    transition: all 200ms linear;
    transition-delay: 0.1s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.contact-page-form__input-box input[type="tel"]:focus,
.contact-page-form__input-box input[type="number"]:focus,
.contact-page-form__input-box input[type="url"]:focus,
.contact-page-form__input-box input[type="date"]:focus,
.contact-page-form__input-box input[type="datetime-local"]:focus,
.contact-page-form__input-box input[type="time"]:focus,
.contact-page-form__input-box select:focus {
    color: #2e2e36;
    border-color: var(--thm-base);
    background: #ffffff;
}

/* Custom dropdown arrow for native <select> */
.contact-page-form__input-box select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1L6 6L11 1' stroke='%2303a9d2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 30px center;
    padding-right: 60px;
    cursor: pointer;
}

/* Date/datetime calendar icon — recolor the default picker indicator */
.contact-page-form__input-box input[type="date"]::-webkit-calendar-picker-indicator,
.contact-page-form__input-box input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.contact-page-form__input-box input[type="time"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(48%) sepia(78%) saturate(2200%) hue-rotate(165deg) brightness(95%) contrast(101%);
}


/* =================================================================
   Dark-theme contact form inputs (.contact-one__form-box .input-box)
   Used on the homepage Free Cleaning Estimate section.
================================================================= */

.contact-one__form-box .input-box input[type="tel"],
.contact-one__form-box .input-box input[type="number"],
.contact-one__form-box .input-box input[type="url"],
.contact-one__form-box .input-box input[type="date"],
.contact-one__form-box .input-box input[type="datetime-local"],
.contact-one__form-box .input-box input[type="time"] {
    position: relative;
    display: block;
    background: transparent;
    width: 100%;
    height: 65px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #ffffff;
    font-size: 17px;
    font-weight: 400;
    font-style: normal;
    padding-left: 30px;
    padding-right: 20px;
    border-radius: var(--thm-bdr-radius);
    transition: all 500ms ease;
    font-family: var(--thm-font-two);
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.contact-one__form-box .input-box input[type="tel"]::placeholder,
.contact-one__form-box .input-box input[type="number"]::placeholder,
.contact-one__form-box .input-box input[type="url"]::placeholder {
    color: #ffffff;
    opacity: 0.85;
}

.contact-one__form-box .input-box input[type="tel"]:focus,
.contact-one__form-box .input-box input[type="number"]:focus,
.contact-one__form-box .input-box input[type="url"]:focus,
.contact-one__form-box .input-box input[type="date"]:focus,
.contact-one__form-box .input-box input[type="datetime-local"]:focus {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}


/* =================================================================
   Checkbox rows — align checkbox + label vertically with the
   surrounding 65px-tall inputs, and replace the default OS checkbox
   with a themed square.
================================================================= */

.input-box--checkbox,
.contact-page-form__input-box--checkbox {
    display: flex;
    align-items: center;
    height: 65px;
    margin-bottom: 30px;
}

.input-box--checkbox input[type="checkbox"],
.contact-page-form__input-box--checkbox input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    margin: 0 12px 0 0;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: all 150ms ease;
}

/* Light variant (contact-page-form) */
.contact-page-form__input-box--checkbox input[type="checkbox"] {
    background: #f1f5f9;
    border: 2px solid #cbd5e1;
}

.contact-page-form__input-box--checkbox input[type="checkbox"]:checked {
    background: var(--thm-base);
    border-color: var(--thm-base);
}

.contact-page-form__input-box--checkbox label {
    color: var(--thm-gray);
    font-family: var(--thm-font-two);
    font-size: 17px;
    margin: 0;
    cursor: pointer;
}

/* Dark variant (contact-one homepage form) */
.input-box--checkbox input[type="checkbox"] {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.input-box--checkbox input[type="checkbox"]:checked {
    background: var(--thm-base);
    border-color: var(--thm-base);
}

.input-box--checkbox label {
    color: #ffffff;
    font-family: var(--thm-font-two);
    font-size: 17px;
    margin: 0;
    cursor: pointer;
}

/* Checkmark glyph inside checked boxes (shared) */
.input-box--checkbox input[type="checkbox"]:checked::after,
.contact-page-form__input-box--checkbox input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 1px;
    width: 6px;
    height: 12px;
    border: solid #ffffff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}


/* =================================================================
   Celebratory success card — replaces the form on success.
   Animated check, falling confetti, and a "send another" button.
================================================================= */

.form-success-card {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 80px 40px 70px;
    border-radius: var(--thm-bdr-radius);
    background: linear-gradient(160deg, #ffffff 0%, #f1f5f9 100%);
    box-shadow: 0 12px 40px rgba(3, 169, 210, 0.12);
    animation: form-success-card-in 450ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.form-success-card--on-dark {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.04) 100%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.20);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

@keyframes form-success-card-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.form-success-card__check {
    width: 88px;
    height: 88px;
    margin: 0 auto 28px;
    border-radius: 50%;
    background: var(--thm-base);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(3, 169, 210, 0.35);
    animation: form-success-pop 600ms cubic-bezier(0.34, 1.56, 0.64, 1) 100ms both;
}

@keyframes form-success-pop {
    0%   { transform: scale(0); }
    60%  { transform: scale(1.12); }
    100% { transform: scale(1); }
}

.form-success-card__check svg {
    width: 44px;
    height: 44px;
    color: #ffffff;
    stroke: currentColor;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: form-success-draw 500ms ease-out 450ms forwards;
}

@keyframes form-success-draw {
    to { stroke-dashoffset: 0; }
}

.form-success-card__title {
    font-family: var(--thm-font);
    font-size: 36px;
    font-weight: 700;
    color: var(--thm-black);
    margin: 0 0 14px;
    letter-spacing: -0.5px;
}

.form-success-card__message {
    font-family: var(--thm-font-two);
    font-size: 17px;
    line-height: 1.6;
    color: var(--thm-gray);
    margin: 0 auto 36px;
    max-width: 520px;
}

.form-success-card--on-dark .form-success-card__title {
    color: #ffffff;
}

.form-success-card--on-dark .form-success-card__message {
    color: rgba(255, 255, 255, 0.85);
}

.form-success-card__actions {
    position: relative;
    z-index: 2;
}

/* Confetti — 28 pieces fall and rotate at varied speeds/angles. */
.form-success-card__confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.form-success-card__confetti span {
    position: absolute;
    top: -24px;
    width: 10px;
    height: 18px;
    border-radius: 2px;
    opacity: 0;
    animation: form-confetti-fall linear forwards;
}

.form-success-card__confetti span:nth-child(5n)   { background: #03a9d2; }
.form-success-card__confetti span:nth-child(5n+1) { background: #ffc857; }
.form-success-card__confetti span:nth-child(5n+2) { background: #ff6b6b; }
.form-success-card__confetti span:nth-child(5n+3) { background: #6ee7b7; }
.form-success-card__confetti span:nth-child(5n+4) { background: #c084fc; }

/* Pre-positioned via inline style (left, animation-delay, animation-duration). */
@keyframes form-confetti-fall {
    0%   { transform: translate3d(0, -24px, 0) rotate(0deg);     opacity: 0; }
    8%   { opacity: 1; }
    100% { transform: translate3d(40px, 600px, 0) rotate(720deg); opacity: 0; }
}
