/**
 * DW Aviso de produto no carrinho
 *
 * Edite primeiro as variáveis abaixo para alterar rapidamente
 * cores, tamanhos e espaçamentos do popup.
 */
:root {
    --dw-apc-overlay-bg: rgba(0, 0, 0, 0.68);
    --dw-apc-modal-bg: #ffffff;
    --dw-apc-text: #222222;
    --dw-apc-muted: #777777;
    --dw-apc-border: #dedede;

    --dw-apc-success-bg: #2ca24f;
    --dw-apc-success-color: #ffffff;

    --dw-apc-close-bg: #6a6e49;
    --dw-apc-close-color: #ffffff;
    --dw-apc-close-hover-bg: #55593a;

    --dw-apc-button-bg: #f1efeb;
    --dw-apc-button-color: #111111;
    --dw-apc-button-border: #111111;
    --dw-apc-button-hover-bg: #6a6e49;
    --dw-apc-button-hover-color: #ffffff;
    --dw-apc-button-radius: 32px;

    --dw-apc-modal-width: 540px;
    --dw-apc-modal-radius: 14px;
    --dw-apc-modal-padding: 40px;
}

body.dw-apc-open {
    overflow: hidden !important;
}

.dw-apc-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--dw-apc-overlay-bg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.dw-apc-overlay.dw-apc-show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.dw-apc-modal {
    position: relative;
    width: 100%;
    max-width: var(--dw-apc-modal-width);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: var(--dw-apc-modal-padding);
    border-radius: var(--dw-apc-modal-radius);
    background: var(--dw-apc-modal-bg);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.dw-apc-overlay.dw-apc-show .dw-apc-modal {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Botão de fechar circular */
.dw-apc-close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--dw-apc-close-bg);
    color: var(--dw-apc-close-color);
    font-family: Arial, sans-serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
    appearance: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.dw-apc-close span {
    display: block;
    transform: translateY(-1px);
}

.dw-apc-close:hover,
.dw-apc-close:focus {
    background: var(--dw-apc-close-hover-bg);
    color: var(--dw-apc-close-color);
    transform: scale(1.05);
    outline: none;
}

.dw-apc-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--dw-apc-success-bg);
    color: var(--dw-apc-success-color);
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.dw-apc-title {
    margin: 0 0 28px;
    padding: 0;
    color: var(--dw-apc-text);
    font-size: 25px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
}

.dw-apc-product {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 18px;
    border: 1px solid var(--dw-apc-border);
    border-radius: 10px;
    background: #ffffff;
}

.dw-apc-product-image-wrap {
    flex: 0 0 110px;
    width: 110px;
    height: 110px;
    overflow: hidden;
    border-radius: 10px;
    background: #f5f5f5;
}

.dw-apc-product-image-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.dw-apc-product-info {
    flex: 1;
    min-width: 0;
}

.dw-apc-product-label {
    display: block;
    margin-bottom: 7px;
    color: var(--dw-apc-muted);
    font-size: 14px;
    line-height: 1.35;
}

.dw-apc-product-name {
    display: block;
    color: var(--dw-apc-text);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.dw-apc-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

/* Botões no mesmo padrão visual do carrinho lateral */
.dw-apc-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 14px 20px;
    border: 1px solid var(--dw-apc-button-border);
    border-radius: var(--dw-apc-button-radius);
    background: var(--dw-apc-button-bg);
    color: var(--dw-apc-button-color);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: 0.04em;
    text-align: center;
    text-decoration: none !important;
    text-transform: uppercase;
    box-shadow: none;
    transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.dw-apc-button:hover,
.dw-apc-button:focus,
.dw-apc-button:active,
a.dw-apc-button:hover,
a.dw-apc-button:focus,
a.dw-apc-button:active {
    border-color: var(--dw-apc-button-hover-bg) !important;
    background: var(--dw-apc-button-hover-bg) !important;
    color: var(--dw-apc-button-hover-color) !important;
    outline: none;
}

.dw-apc-button:hover *,
.dw-apc-button:focus *,
.dw-apc-button:active * {
    color: var(--dw-apc-button-hover-color) !important;
}

@media (max-width: 767px) {
    :root {
        --dw-apc-modal-padding: 48px 22px 26px;
        --dw-apc-modal-radius: 20px;
    }

    .dw-apc-overlay {
        padding: 15px;
    }

    .dw-apc-modal {
        max-height: calc(100vh - 30px);
    }

    .dw-apc-close {
        top: 13px;
        right: 13px;
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
        font-size: 23px;
    }

    .dw-apc-success-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 18px;
        font-size: 38px;
    }

    .dw-apc-title {
        margin-bottom: 26px;
        font-size: 27px;
    }

    .dw-apc-product {
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 27px;
        padding: 15px;
        border-radius: 12px;
    }

    .dw-apc-product-image-wrap {
        flex-basis: 90px;
        width: 90px;
        height: 90px;
    }

    .dw-apc-product-label {
        margin-bottom: 4px;
        font-size: 15px;
    }

    .dw-apc-product-name {
        font-size: 17px;
    }

    .dw-apc-actions {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .dw-apc-button {
        min-height: 64px;
        padding: 14px 20px;
        font-size: 16px;
    }
}

/* Link de ação para fechar o aviso e continuar navegando */
.dw-apc-continue-shopping {
    display: block;
    width: auto;
    margin: -10px auto 18px;
    padding: 4px 8px;
    border: 0;
    border-bottom: 1px solid currentColor;
    border-radius: 0;
    background: transparent;
    color: var(--dw-apc-text);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.04em;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: none;
    appearance: none;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.dw-apc-continue-shopping:hover,
.dw-apc-continue-shopping:focus {
    border-color: var(--dw-apc-button-hover-bg);
    background: transparent;
    color: var(--dw-apc-button-hover-bg);
    outline: none;
}

@media (max-width: 767px) {
    .dw-apc-continue-shopping {
        margin-top: -7px;
        margin-bottom: 18px;
        font-size: 13px;
    }
}
