/* ==========================================================================
   Product After Sales — frontend styles
   ========================================================================== */


.poolroboter-product-after-sales {
    font-family: 'Poppins', sans-serif;
    padding-top: 30px;
}

.poolroboter-product-after-sales > .container {
    max-width: 1290px;
    margin: 0 auto;
    padding: 0;
}

.poolroboter-product-after-sales__inner {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 645px;
}

/* Name + Price ------------------------------------------------------------ */
.poolroboter-product-after-sales__name-price {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-bottom: 0;
}

.poolroboter-product-after-sales__title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.875rem;
    line-height: 2.8125rem;
    color: #181c1f;
    margin: 0;
}

/* Out (price badge row) --------------------------------------------------- */
.poolroboter-product-after-sales__out {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background-color: #f4f9fc;
    border: 1px solid #c8d8e9;
    border-radius: 8px;
    padding: 0 1.4375rem;
    min-height: 3.4375rem;
    margin-top: 0.625rem;
}

.poolroboter-product-after-sales__old-price {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.40625rem;
    color: #9ca5ae;
    text-decoration: line-through;
}

.poolroboter-product-after-sales__old-price .woocommerce-Price-amount,
.poolroboter-product-after-sales__old-price bdi {
    color: inherit;
    text-decoration: inherit;
}

.poolroboter-product-after-sales__note {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.5rem;
    background-color: #5a6b7a;
    border-radius: 8px;
    box-shadow: 0px 4px 4px 0px rgba(126, 126, 126, 0.15);
}

.poolroboter-product-after-sales__note-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.3125rem;
    color: #ffffff;
    white-space: nowrap;
}

/* Text + Taxes ------------------------------------------------------------ */
.poolroboter-product-after-sales__text-taxes {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-top: 0.9375rem;
}

.poolroboter-product-after-sales__subtitle {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 0.9375rem;
    line-height: 1.40625rem;
    color: #6b7a88;
    margin: 0;
}

.poolroboter-product-after-sales__description {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.5rem;
    color: #181c1f;
    margin: 0;
}

.poolroboter-product-after-sales__description p {
    margin: 0 0 0.5rem;
}

.poolroboter-product-after-sales__description p:last-child {
    margin-bottom: 0;
}

/* Item Withdrawn from Sale ----------------------------------------------- */
.poolroboter-product-after-sales__withdrawn {
    background-color: #fef4cf;
    border: 1px solid #f3d676;
    border-radius: 24px;
    padding: 1rem 1.75rem;
    margin-top: 1.5625rem;
}

.poolroboter-product-after-sales__withdrawn-inner {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1.25rem;
}

.poolroboter-product-after-sales__icon {
    flex-shrink: 0;
    width: 4.0625rem;
    height: 4.0625rem;
    background-color: #f3d676;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poolroboter-product-after-sales__icon svg {
    width: 1.5625rem;
    height: 1.5625rem;
}

.poolroboter-product-after-sales__withdrawn-content {
    display: flex;
    flex-direction: column;
    gap: 0.3125rem;
    flex: 1;
}

.poolroboter-product-after-sales__withdrawn-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.125rem;
    line-height: 1.6875rem;
    color: #864925;
    margin: 0;
}

.poolroboter-product-after-sales__withdrawn-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 1.3125rem;
    color: #ac6a3b;
    margin: 0;
}

/* Actions (buttons row) -------------------------------------------------- */
.poolroboter-product-after-sales__actions {
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    align-items: center;
    gap: 0.625rem;
    margin-top: 1.5625rem;
    flex-wrap: wrap;
}

/* Button: Ersatzteile ansehen — borrows only the rotating overlay animation
   from the global .btn pattern (defined in custom-global.css via @keyframes
   `animate`). The icon + label markup remains intact. */
.poolroboter-product-after-sales__btn-spare {
    position: relative;
    z-index: 0;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.875rem 1.4375rem;
    min-width: 27.6875rem;
    min-height: 3.125rem;
    background-color: #014FA0;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    overflow: hidden;
    transition: background-color 0.4s ease;
}

.poolroboter-product-after-sales__btn-spare:hover {
    background-color: #1279D6;
    text-decoration: none;
}

.poolroboter-product-after-sales__btn-spare i {
    position: absolute;
    z-index: -1;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 200px;
    background-color: inherit;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    pointer-events: none;
}

.poolroboter-product-after-sales__btn-spare i:before,
.poolroboter-product-after-sales__btn-spare i:after {
    content: "";
    position: absolute;
    width: 100%;
    height: 200%;
    top: 0;
    left: 50%;
    transform: translate(-50%, -75%);
}

.poolroboter-product-after-sales__btn-spare i:before {
    border-radius: 46%;
    background-color: rgba(20, 20, 20, 0.2);
    animation: animate 5s linear infinite;
}

.poolroboter-product-after-sales__btn-spare i:after {
    border-radius: 40%;
    background-color: rgba(20, 20, 20, 0.5);
    animation: animate 10s linear infinite;
}

.poolroboter-product-after-sales__btn-spare-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.3125rem;
    color: #ffffff;
}

.poolroboter-product-after-sales__btn-spare-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

/* Button: Teil anfragen ------------------------------------------------- */
.poolroboter-product-after-sales__btn-request {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.875rem 1.4375rem;
    background: transparent;
    border-radius: 16px;
    border: 1px solid #1279d6;
    cursor: pointer;
    min-width: 11.3125rem;
    min-height: 3.125rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.poolroboter-product-after-sales__btn-request:hover {
    background-color: rgba(18, 121, 214, 0.06);
    transform: translateY(-2px);
}

.poolroboter-product-after-sales__btn-request:active {
    transform: translateY(0);
}

.poolroboter-product-after-sales__btn-request-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.poolroboter-product-after-sales__btn-request-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 0.9375rem;
    line-height: 1.40625rem;
    color: #1279d6;
}

/* Alternative text ------------------------------------------------------ */
.poolroboter-product-after-sales__alternative {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.5rem;
    color: #000000;
    margin: 0;
    margin-top: 1.25rem;
}

.poolroboter-product-after-sales__alternative p {
    margin: 0 0 0.5rem;
}

.poolroboter-product-after-sales__alternative p:last-child {
    margin-bottom: 0;
}

.poolroboter-product-after-sales__alternative a {
    color: #1279d6;
    text-decoration: underline;
}

.poolroboter-product-after-sales__alternative a:hover {
    color: #0f64b0;
}

/* Responsive ------------------------------------------------------------ */
@media (max-width: 767px) {
    .poolroboter-product-after-sales__inner {
        max-width: 100%;
    }

    .poolroboter-product-after-sales__out {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }

    .poolroboter-product-after-sales__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .poolroboter-product-after-sales__btn-spare {
        min-width: 0;
        width: 100%;
    }

    .poolroboter-product-after-sales__btn-request {
        min-width: unset;
        width: 100%;
    }

    .poolroboter-product-after-sales__withdrawn-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .poolroboter-product-after-sales__title {
        font-size: 1.5rem;
        line-height: 2.25rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .poolroboter-product-after-sales__inner {
        max-width: 100%;
    }

    .poolroboter-product-after-sales__btn-spare {
        min-width: 0;
        flex: 1;
    }

    .poolroboter-product-after-sales__btn-request {
        min-width: unset;
    }
}

@media (min-width: 1024px) {
    .poolroboter-product-after-sales__inner {
        max-width: 645px;
    }
}

/* ==========================================================================
   Modal
   ========================================================================== */

.pr-after-sales-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    overflow: auto;
}

.pr-after-sales-modal[hidden] {
    display: none;
}

.pr-after-sales-modal__overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

.pr-after-sales-modal__dialog {
    position: relative;
    z-index: 1;
    top: 10px;
    max-width: 650px;
    width: 100%;
    max-height: calc(100vh - 50px);
    overflow: auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    font-family: 'Poppins', sans-serif;
}

.pr-after-sales-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: #181c1f;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.pr-after-sales-modal__close:hover,
.pr-after-sales-modal__close:focus-visible {
    background-color: rgba(0, 0, 0, 0.06);
    outline: none;
}

.pr-after-sales-modal__title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    line-height: 1.875rem;
    color: #181c1f;
    margin: 0 0 12px;
    padding-right: 30px;
}

.pr-after-sales-modal__description {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 0.9375rem;
    line-height: 1.40625rem;
    color: #6b7a88;
    margin: 0 0 16px;
}

.pr-after-sales-modal__form {
    margin-top: 8px;
}

body.pr-after-sales-modal-open {
    overflow: hidden;
}

@media (max-width: 480px) {
    .pr-after-sales-modal {
        padding: 10px;
    }

    .pr-after-sales-modal__dialog {
        padding: 24px 20px;
        border-radius: 12px;
    }
}
