
/* =========================================
   CHECKOUT - BURGER EM CASA
   Interface sci-fi / Mass Effect
   ========================================= */

/* ---------- FUNDO ---------- */

.checkoutScreen {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 5000;

    width: 100%;
    height: 100vh;
    height: 100dvh;

    overflow-y: auto;

    padding: 24px;

    background:
        radial-gradient(
            circle at 15% 15%,
            rgba(53, 200, 240, 0.12),
            transparent 40%
        ),
        radial-gradient(
            circle at 85% 85%,
            rgba(230, 59, 72, 0.09),
            transparent 40%
        ),
        rgba(2, 10, 16, 0.88);

    backdrop-filter: blur(6px);
}

/* ---------- PAINEL ---------- */

.checkout {
    position: relative;

    width: 100%;
    max-width: 680px;

    margin: 24px auto;
    padding: 36px;

    box-sizing: border-box;

    color: #eef7fa;

    background:
        linear-gradient(
            145deg,
            rgba(15, 45, 60, 0.98),
            rgba(5, 20, 29, 0.99)
        );

    border: 1px solid rgba(53, 200, 240, 0.38);
    border-radius: 10px;

    box-shadow:
        0 25px 65px rgba(0, 0, 0, 0.50),
        0 0 30px rgba(53, 200, 240, 0.05);
}

.checkout::before {
    content: '';

    position: absolute;
    top: 0;
    left: 35px;

    width: 115px;
    height: 3px;

    background:
        linear-gradient(90deg, #35c8f0, #e63b48);
}

/* ---------- TÍTULO ---------- */

.checkout h1 {
    margin: 0 45px 30px 0;
    padding-bottom: 18px;

    color: #ffffff;

    border-bottom: 1px solid rgba(53, 200, 240, 0.17);

    text-align: left;

    font-size: 36px;
    font-weight: 700;
    line-height: 1.1;
}

/* ---------- FECHAR ---------- */

.closeCheckout {
    position: absolute;
    top: 24px;
    right: 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    padding: 0;

    color: #9edcec;
    background: rgba(53, 200, 240, 0.08);

    border: 1px solid rgba(53, 200, 240, 0.35);
    border-radius: 6px;

    font-size: 26px;
    font-weight: 400;
    line-height: 1;

    cursor: pointer;
    transition: 0.2s ease;
}

.closeCheckout:hover {
    color: #ffffff;
    background: rgba(53, 200, 240, 0.20);
    border-color: #35c8f0;
}

/* ---------- FORMULÁRIO ---------- */

.checkoutForm {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.formGroup {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.formGroup label {
    color: #d7e8ee;

    font-size: 18px;
    font-weight: 600;
}

/* ---------- CAMPOS ---------- */

.formGroup input,
.formGroup select,
.formGroup textarea {
    width: 100%;
    min-height: 48px;

    padding: 12px 14px;

    box-sizing: border-box;

    color: #eef7fa;
    background: rgba(2, 16, 24, 0.65);

    border: 1px solid rgba(53, 200, 240, 0.30);
    border-radius: 5px;

    font-family: inherit;
    font-size: 18px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.formGroup input::placeholder,
.formGroup textarea::placeholder {
    color: #8199a4;
    opacity: 1;
}

.formGroup input:hover,
.formGroup select:hover,
.formGroup textarea:hover {
    border-color: rgba(53, 200, 240, 0.55);
}

/* ---------- FOCO CIANO ---------- */

.formGroup input:focus,
.formGroup select:focus,
.formGroup textarea:focus {
    border-color: #35c8f0;

    background: rgba(6, 28, 39, 0.92);

    box-shadow:
        0 0 0 3px rgba(53, 200, 240, 0.10),
        0 0 15px rgba(53, 200, 240, 0.07);
}

/* ---------- SELECT ---------- */

.formGroup select {
    cursor: pointer;
    color-scheme: dark;
}

.formGroup select option {
    color: #eef7fa;
    background: #0b2634;
}

/* ---------- OBSERVAÇÕES ---------- */

.formGroup textarea {
    min-height: 105px;
    resize: vertical;
    line-height: 1.4;
}

/* ---------- ERROS ---------- */

.formError {
    min-height: 16px;

    color: #ff8992;

    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.formGroup .inputError {
    border: 1px solid #e63b48 !important;

    box-shadow:
        0 0 0 2px rgba(230, 59, 72, 0.12);
}

/* mantém o erro visível mesmo com foco */

.formGroup .inputError:focus {
    border-color: #e63b48 !important;
}

/* =========================================
   RESUMO DO PEDIDO
   ========================================= */

.checkoutSummary {
    margin-top: 32px;
    padding-top: 24px;

    border-top: 1px solid rgba(53, 200, 240, 0.25);
}

.checkoutSummary h2 {
    margin: 0 0 20px;

    color: #ffffff;

    font-size: 26px;
    font-weight: 700;
    text-align: left;
}

.checkoutItems {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.checkoutItem {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 16px;

    padding: 14px 0;

    color: #d0e2e9;

    border-bottom:
        1px solid rgba(53, 200, 240, 0.12);

    font-size: 18px;
    line-height: 1.35;
}

.checkoutItem div:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.checkoutItem div:last-child {
    flex-shrink: 0;

    color: #e8f3f6;

    font-weight: 700;
    white-space: nowrap;
}

/* ---------- TOTAL ---------- */

.checkoutTotal {
    margin-top: 24px;

    color: #d8a93d;

    font-size: 28px;
    font-weight: 700;
    text-align: right;
}

/* =========================================
   AÇÕES
   ========================================= */

.checkoutActions {
    display: flex;
    flex-direction: column;
    align-items: stretch;

    gap: 12px;

    margin-top: 30px;
}

.checkoutActions button {
    width: 100%;
    max-width: none;
    min-height: 52px;

    padding: 10px 18px;

    border-radius: 5px;

    font-family: inherit;
    font-size: 20px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

/* ---------- CONFIRMAR - DOURADO ---------- */

.confirmOrder {
    color: #07161d;

    background:
        linear-gradient(
            90deg,
            #d8a93d,
            #edca6a
        );

    border: 1px solid #f0d477;

    box-shadow:
        0 7px 20px rgba(0, 0, 0, 0.25);
}

.confirmOrder:hover {
    background:
        linear-gradient(
            90deg,
            #e5b94f,
            #f5d985
        );

    border-color: #ffe29a;

    box-shadow:
        0 8px 25px rgba(216, 169, 61, 0.20);

    transform: translateY(-1px);
}

/* ---------- VOLTAR - AZUL ---------- */

.backToCart {
    color: #bcecf7;

    background: rgba(53, 200, 240, 0.07);

    border: 1px solid rgba(53, 200, 240, 0.38);
}

.backToCart:hover {
    color: #ffffff;

    background: rgba(53, 200, 240, 0.17);

    border-color: #35c8f0;
}

/* ---------- ACESSIBILIDADE ---------- */

.checkout button:focus-visible {
    outline: 2px solid #35c8f0;
    outline-offset: 3px;
}

/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 600px) {

    .checkoutScreen {
        padding: 0;
    }

    .checkout {
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;

        margin: 0;
        padding: 75px 20px 35px;

        border: none;
        border-radius: 0;
    }

    .checkout::before {
        left: 20px;
        width: 100px;
    }

    .checkout h1 {
        margin: 0 35px 26px 0;

        font-size: 30px;
    }

    .closeCheckout {
        top: 20px;
        right: 20px;
    }

    .checkoutForm {
        gap: 17px;
    }

    .formGroup label {
        font-size: 17px;
    }

    .formGroup input,
    .formGroup select,
    .formGroup textarea {
        font-size: 16px;
    }

    .checkoutSummary {
        margin-top: 25px;
    }

    .checkoutSummary h2 {
        font-size: 24px;
    }

    .checkoutItem {
        font-size: 16px;
    }

    .checkoutTotal {
        font-size: 25px;
    }

    .checkoutActions button {
        min-height: 52px;
        font-size: 19px;
    }
}

.checkoutSummary h2 {
    margin-bottom: 8px;
}