/* =============================================================================
   See the Stars PTA Screener — Main Stylesheet
   ============================================================================= */

/* -----------------------------------------------------------------------------
   1. Gravity Forms overrides
   ----------------------------------------------------------------------------- */

/* Hide the GF back button on the first form page */
#sts-pta-screener .gform_wrapper .gform_previous_button {
    display: none !important;
}

/* Hide the page header once the screener is past the intake form */
.screener-past-page-one #page-screener-header {
    display: none;
}
.screener-past-page-one #page-screener-wrapper {
    padding-top: 30px;
}


/* -----------------------------------------------------------------------------
   2. Question icons
   ----------------------------------------------------------------------------- */

#sts-pta-screener .question-icon {
    display: block;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    height: 146px;
    width: 178px;
    margin-bottom: 30px;
}

#sts-pta-screener .icon-zip    { background-image: url('../img/icon-zip.svg'); }
#sts-pta-screener .icon-results { background-image: url('../img/icon-results.svg'); }

@media (min-width: 768px) {
    #sts-pta-screener .icon-zip     { height: 164px; width: 200px; }
    #sts-pta-screener .icon-results { height: 164px; width: 200px; }
}

#sts-pta-screener .icon-owner         { background-image: url('../img/icon-owner.svg'); }
#sts-pta-screener .icon-household     { background-image: url('../img/icon-household.svg'); }
#sts-pta-screener .icon-income        { background-image: url('../img/icon-income.svg'); }
#sts-pta-screener .icon-date          { background-image: url('../img/icon-date.svg'); }
#sts-pta-screener .icon-disability    { background-image: url('../img/icon-disability.svg'); }
#sts-pta-screener .icon-dependent     { background-image: url('../img/icon-dependent.svg'); }
#sts-pta-screener .icon-duration      { background-image: url('../img/icon-duration.svg'); }
#sts-pta-screener .icon-home-value    { background-image: url('../img/icon-home-value.svg'); }
#sts-pta-screener .icon-homestead     { background-image: url('../img/icon-homestead.svg'); }
#sts-pta-screener .icon-marital-status { background-image: url('../img/icon-marital.svg'); }
#sts-pta-screener .icon-occupance     { background-image: url('../img/icon-occupance.svg'); }
#sts-pta-screener .icon-renter        { background-image: url('../img/icon-renter.svg'); }
#sts-pta-screener .icon-state-benefits { background-image: url('../img/icon-state-benefits.svg'); }
#sts-pta-screener .icon-taxes-paid    { background-image: url('../img/icon-taxes-paid.svg'); }
#sts-pta-screener .icon-veteran       { background-image: url('../img/icon-veteran.svg'); }


/* -----------------------------------------------------------------------------
   3. Tooltip trigger button
   ----------------------------------------------------------------------------- */

#sts-pta-screener .gf-tooltip-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

#sts-pta-screener .gf-tooltip-trigger {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    padding: 0;
    cursor: pointer;
    line-height: 24px;
    display: inline-block;
    height: 24px;
    width: 24px;
    box-shadow: none;
    background: url('../img/info.svg') no-repeat center !important;
    background-size: contain !important;
    transition: background-color 0.15s ease;
}


/* -----------------------------------------------------------------------------
   4. Tooltip bubble
   ----------------------------------------------------------------------------- */

#sts-pta-screener .gf-tooltip-bubble {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 18rem;
    z-index: 100;

    background-color: #1f2937;
    color: #f9fafb;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);

    --arrow-size: 0.4rem;

    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

#sts-pta-screener .gf-tooltip-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: var(--arrow-size) solid transparent;
    border-top-color: #1f2937;
}

#sts-pta-screener .gf-tooltip-trigger[aria-expanded="true"] + .gf-tooltip-bubble,
#sts-pta-screener .gf-tooltip-wrap:hover .gf-tooltip-bubble {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#sts-pta-screener .gf-tooltip-wrap--below .gf-tooltip-bubble {
    bottom: auto;
    top: calc(100% + 0.5rem);
}
#sts-pta-screener .gf-tooltip-wrap--below .gf-tooltip-bubble::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: #1f2937;
}

#sts-pta-screener .gf-tooltip-bubble a {
    color: #93c5fd;
    text-decoration: underline;
}
#sts-pta-screener .gf-tooltip-bubble a:hover {
    color: #bfdbfe;
}

@media (prefers-reduced-motion: reduce) {
    #sts-pta-screener .gf-tooltip-bubble,
    #sts-pta-screener .gf-tooltip-trigger {
        transition: none;
    }
}


/* -----------------------------------------------------------------------------
   5. Screener question error states
   ----------------------------------------------------------------------------- */

#sts-pta-screener .gfield_error input,
#sts-pta-screener .gfield_error select,
#sts-pta-screener .gfield_error textarea {
    border: 2px solid #dc2626 !important;
    outline-color: #dc2626;
}

#sts-pta-screener .gfield_validation_message {
    color: #dc2626;
    font-weight: 600;
    margin-top: 0.25rem;
}
