/**
 * Pool Mini Popup Styles
 */

/* Pool Mini Trigger Button - Spinning Star */
.pool-mini-trigger__star {
    margin-left: 6px;
    animation: spin-star 3s linear infinite;
    display: inline-block;
}

@keyframes spin-star {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Custom backdrop scoped to this modal only */
#poolMiniPopupModal {
    //background: rgba(0, 0, 0, 0.5);
    background: rgba(0, 28, 59, 0.25);
}

#poolMiniPopupModal .modal-content {
    /* Ensure content is visible above the backdrop background */
    position: relative;
    z-index: 1;
    box-shadow: 0px 0px 50px 0px rgba(0, 0, 0, 0.25);
}

#poolMiniPopupModal .modal-body-content {
    padding: 20px;
}

/* ==========================================================================
   Multi-Step Form Styles
   ========================================================================== */

/* Step Container */
.form-step {
    display: none;
}

.form-step--active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Step Header */
.form-step__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.form-step__header h4 {
    margin: 0;
    font-size: 20px;
    font-family: 'Roboto Serif', 'Times', serif;
    font-weight: 400;
    text-wrap: pretty;
    color: #000;
}

.form-step__indicator {
    font-size: 14px;
    font-weight: 500;
    color: #000;
    background: #f5f3ec;
    padding: 4px 12px;
    border-radius: 20px;
}

.pool-mini-description-text {
    font-size: 15px;
    font-weight: 500;
    color: #000;
    margin-bottom: 10px;
}
/* Step Navigation */
.form-step__nav {
    margin-top: 10px;
}

.form-step--1 .form-step__nav {
    margin-top: 20px;
}

.form-step__nav--split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.form-step__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.form-step__btn--next {
    background: #002e5e;
    color: #fff;
    margin-left: auto;
    display: flex;
}

.form-step__btn--next:hover:not(:disabled) {
    background: #d57262;
}

.form-step__btn--next:disabled, .form-step__btn--next:hover:disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
}

.form-step__btn--back {
    background: transparent;
    padding: 0 20px;
    color: #222;
    border: none;
}

.form-step__btn--back:hover {
    background: transparent;
}

/* Move submit button styling */
.form-step__nav .hs-submit {
    margin: 0;
    flex-grow: 1;
}

.form-step__nav .hs-submit .hs-button {
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
}

/* Validation Error Styles */
.form-step .hs-form-field.has-error input,
.form-step .hs-form-field.has-error select,
.form-step .hs-form-field.has-error textarea {
    border-color: #d93025;
}

.form-step__error {
    color: #d93025;
    font-size: 13px;
    margin-top: 5px;
}

/* Step 1 specific - pool design header emphasis */
.form-step--1 .form-step__header h4 {
    font-size: 22px;
}
.hs_select_your_pool_mini_design label {
    display: none;
}

/* Step 2 field layout - spacing */
.form-step--2 .hs-form-field {
    margin-bottom: 18px;
}

/* Step 2 field layout - side-by-side pairs */
.form-step--2 .hs_firstname,
.form-step--2 .hs_lastname {
    display: inline-block;
    width: calc(50% - 15px);
    vertical-align: top;
}

.form-step--2 .hs_firstname {
    margin-right: 30px;
}

.form-step--2 .hs_street_address_line_2 {
    display: block;
    width: 100%;
}

.form-step--2 .hs_city,
.form-step--2 .hs_state {
    display: inline-block;
    width: calc(50% - 15px);
    vertical-align: top;
}

.form-step--2 .hs_city {
    margin-right: 30px;
}

.form-step--2 .hs_zip,
.form-step--2 .hs_email {
    display: inline-block;
    width: calc(50% - 15px);
    vertical-align: top;
}

.form-step--2 .hs_zip {
    margin-right: 30px;
}

/* Tablet - reduce horizontal gap */
@media (max-width: 767px) {
    .form-step--2 .hs_firstname,
    .form-step--2 .hs_lastname,
    .form-step--2 .hs_city,
    .form-step--2 .hs_state,
    .form-step--2 .hs_zip,
    .form-step--2 .hs_email {
        width: calc(50% - 8px);
    }

    .form-step--2 .hs_firstname,
    .form-step--2 .hs_city,
    .form-step--2 .hs_zip {
        margin-right: 16px;
    }
}

/* Mobile - stack fields vertically */
@media (max-width: 480px) {
    .form-step--2 .hs_firstname,
    .form-step--2 .hs_lastname,
    .form-step--2 .hs_city,
    .form-step--2 .hs_state,
    .form-step--2 .hs_zip,
    .form-step--2 .hs_email {
        display: block;
        width: 100%;
        margin-right: 0;
    }
}

#poolMiniPopupModal .pool-mini-form {
    max-width: 700px;
    margin: 0 auto;
    background: #e8e5dd;
    padding: 20px 30px;
    border-radius: 20px;
}

@media (min-width: 768px) {
    #poolMiniPopupModal .pool-mini-form {
        padding: 40px;
    }
}

/* Pool Design Radio Selection */
#poolMiniPopupModal input[name="select_your_pool_mini_design"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

#poolMiniPopupModal .hs-form-radio {
    display: inline-block;
    margin: 0;
    padding: 0;
}

/* Card Styling */
#poolMiniPopupModal .hs-form-radio-display {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    cursor: pointer;
    background: #fffdf7;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

#poolMiniPopupModal .hs-form-radio-display:hover {
    border-color: #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#poolMiniPopupModal input[name="select_your_pool_mini_design"]:checked + span,
#poolMiniPopupModal input[name="select_your_pool_mini_design"]:checked ~ span {
    font-weight: 600;
}

#poolMiniPopupModal .hs-form-radio-display:has(input:checked) {
    border-color: #002e5e;
    box-shadow: 0 0 0 2px rgba(0, 46, 94, 0.2);
}

/* Image Wrapper */
#poolMiniPopupModal .pool-design-image-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 8px;
}

#poolMiniPopupModal .pool-design-image {
    width: 100px;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Expand Button */
#poolMiniPopupModal .pool-design-expand-btn {
    position: absolute;
    top: 0;
    right: 0;
    height: 24px;
    padding: 0 4px;
    border: none;
    border-radius: 4px;
    background: none;
    background: #f5f3ec;
    border: 1px solid #ccc;
    color: rgba(0, 0, 0, 0.6);
    font-size: 11px;
    font-weight: normal;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

#poolMiniPopupModal .pool-design-expand-btn span {
    opacity: 0.6;
}

#poolMiniPopupModal .pool-design-expand-btn:hover {
    //background: none;
    transform: scale(1.1);
    color: #000;
}

#poolMiniPopupModal .hs-form-radio-display span {
    font-size: 14px;
    text-align: center;
    color: #333;
}

/* Grid layout for pool design options */
#poolMiniPopupModal ul.inputs-list.multi-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
    //background: #f5f5f5;
    border-radius: 8px;
}

#poolMiniPopupModal ul.inputs-list.multi-container li span {
    color: #000;
    font-size: 16px;
}

/* Lightbox Styles */
.pool-design-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pool-design-lightbox.is-active {
    opacity: 1;
    visibility: visible;
}

.pool-design-lightbox__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.pool-design-lightbox__content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    z-index: 1;
    text-align: center;
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.pool-design-lightbox__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: #F48472;
    border-radius: 50%;
    color: #000;
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.pool-design-lightbox__close:hover {
    background: #e0e0e0;
    transform: scale(1.1);
}

.pool-design-lightbox__image {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
}

.pool-design-lightbox__caption {
    color: #333333;
    font-family: 'Roboto Serif', 'Times', serif;
    font-size: 26px;
    margin-top: 15px;
    margin-bottom: 0;
    font-weight: 400;
}

body.lightbox-open {
    overflow: hidden;
}


.pool-mini-success__image {
    max-width: 470px;
    height: auto;
    margin: 0 auto 20px;
    display: block;
}

/* Tablet */
@media (max-width: 991px) {
    #poolMiniPopupModal ul.inputs-list.multi-container {
        grid-template-columns: repeat(2, 1fr);
    }

    #poolMiniPopupModal .pool-design-image {
        width: 80px;
    }

    .form-step__header {
        position: relative;
    }

    .form-step__indicator {
        position: absolute;
        top: -3rem;
        right: -3rem;
        background: #555;
        color: #fff;
    }
    .pool-mini-success__image {
        max-width: 100%;
    }
}

/* Mobile landscape */
@media (max-width: 767px) {
    .form-step__indicator {
        top: -2rem;
        right: -2rem;
    }
    #poolMiniPopupModal ul.inputs-list.multi-container {
        display: flex;
        flex-wrap: nowrap;
        gap: 12px;
        padding: 10px 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: thin;
    }

    #poolMiniPopupModal ul.inputs-list.multi-container::-webkit-scrollbar {
        height: 6px;
    }

    #poolMiniPopupModal ul.inputs-list.multi-container::-webkit-scrollbar-track {
        background: #e0e0e0;
        border-radius: 3px;
    }

    #poolMiniPopupModal ul.inputs-list.multi-container::-webkit-scrollbar-thumb {
        background: #999;
        border-radius: 3px;
    }

    #poolMiniPopupModal ul.inputs-list.multi-container > li {
        flex: 0 0 auto;
        width: 140px;
        scroll-snap-align: start;
    }

    #poolMiniPopupModal .hs-form-radio-display {
        padding: 10px;
    }

    #poolMiniPopupModal .pool-design-image {
        width: 110px;
    }

    #poolMiniPopupModal .hs-form-radio-display span {
        font-size: 13px;
    }

    .pool-design-lightbox__caption {
        font-size: 16px;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    #poolMiniPopupModal .modal-dialog {
        margin: 10px;
    }

    #poolMiniPopupModal ul.inputs-list.multi-container {
        gap: 10px;
        padding: 8px 0;
    }

    #poolMiniPopupModal ul.inputs-list.multi-container > li {
        width: 130px;
    }

    #poolMiniPopupModal .hs-form-radio-display {
        padding: 8px;
    }

    #poolMiniPopupModal .pool-design-image {
        width: 100px;
    }

    #poolMiniPopupModal .hs-form-radio-display span {
        font-size: 12px;
    }

    .pool-design-lightbox__close {
        top: -35px;
        width: 30px;
        height: 30px;
        font-size: 28px;
    }

    .pool-design-lightbox__caption {
        font-size: 14px;
    }

    /* Multi-step mobile styles */
    .form-step__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .form-step__header h4 {
        font-size: 18px;
    }

    .form-step__indicator {
        font-size: 12px;
    }

    .form-step__btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .form-step__nav--split {
        flex-direction: row;
    }

    .form-step__nav--split .hs-submit {
        flex: 1;
    }

    .form-step__nav--split .hs-submit .hs-button {
        width: 100%;
    }
}

/* Success Message */
.pool-mini-success {
    text-align: center;
    padding: 20px;
}

.pool-mini-success h4 {
    margin-bottom: 20px;
}


.pool-mini-success p {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.pool-mini-success p a {
    color: #002e5e;
    text-decoration: underline;
}

.pool-mini-success p a:hover {
    color: #001a3a;
}

#poolMiniPopupModal .hs-button {
    justify-content: center;
}

@media (min-width: 768px) {
    .button-secondary-dark.outline {
        margin-bottom: 10px;
    }
}