@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;600;700&display=swap');

/* Garante que o container raiz cubra a tela, mas sem overlay duplicado */
body[data-view="checkout"] .container {
    height: 100vh;
}

body[data-view="checkout"] .container::before {
    display: none;
}

.checkout-container {
    font-family: 'Inter', sans-serif;
    color: #FFFFFFCC;
    width: 100%;
    height: 100vh;
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    background-size: cover;
    background-position: center;
    overflow: visible;
}
.checkout-container::before{
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    /* 65% de opacidade escura - transparente */
    z-index: 0;
    /* Abaixo do conteúdo, mas sobre a imagem de background */
    pointer-events: none;
    /* Não interfere com cliques */
}
.checkout-container > * {
    position: relative;
    z-index: 1;
}
.checkout-sidebar {
    background: none;
    color: #fff;
    text-align: center;
    font-size: 18px;
    line-height: 1.4;
}

.checkout-sidebar p {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 15px;
    line-height: 1;
    letter-spacing: 0;
    margin-bottom: 32px;
    color: #fff;
    opacity: 0.85;
}

/* Ensure QR message above the QR image is left-aligned when it wraps */
#checkout-qr-message {
    margin-top: 20px !important;
    text-align: left;
    display: block;
    margin-right: 0;
}

.aplication-logo-checkout {
    width: 200px;
    height: auto; /* fallback para navegadores sem object-fit */
    max-width: 100%;
    max-height: 100%;
    background: #fff;
    border-radius: 24px;
    margin: 0 auto;
    display: block;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
    overflow: hidden; /* Garante que a imagem dentro respeite o border-radius */
}

/* Estilo para a imagem QR code criada via DOM */
.aplication-logo-checkout img,
.qr-code-img {
 
    object-fit: contain;
    display: block;
    border-radius: 24px;
}

.checkout-content {
    padding: 70px;
    color: #fff;
    background: none;
    border-radius: 0;
    box-shadow: none;
    outline: none; /* Remove outline quando focado */
}

/* Título principal da página de checkout */
.checkout-title {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 32px;
    line-height: 1;
    letter-spacing: 0;
    margin-bottom: 32px;
    color: #fff;
    text-align: left;
}

/* Linha de total a pagar (IE9: block com float) */
.checkout-total {
    /* IE9: usar block com clear */
    display: block;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-style: normal;
    font-size: 18px;
    line-height: 1;
    letter-spacing: 0;
    margin-bottom: 32px;
    overflow: hidden; /* clearfix */
    text-align: left;
}

.checkout-total-label {
    float: left;
}

.checkout-total-value {
    float: right;
}

.checkout-total-value {
    /* float: right já definido acima */
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-style: normal;
    font-size: 18px;
    line-height: 1;
    letter-spacing: 0;
    background: none;
}

.checkout-total-value .checkout-currency {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 18px;
    line-height: 1;
    letter-spacing: 0;
}

/* Bloco de detalhes de serviços e consumo */
.checkout-details {
    margin-top: 16px;
    background: none;
    padding-left: 40px;
}

.checkout-details h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-style: normal;
    font-size: 18px;
    line-height: 1;
    letter-spacing: 0;
    margin-bottom: 18px;
}

/* Seção individual (Serviços ou Consumo) */
.checkout-section {
    margin-bottom: 18px;
}

.checkout-section h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-style: normal;
    font-size: 16px;
    line-height: 1;
    letter-spacing: 0;
    margin-bottom: 10px;
    color: #FFFFFF66;
    opacity: 0.85;
}

.checkout-list {
    /* IE9: usar block */
    display: block;
}

.checkout-list-item {
    /* IE9: usar block com float para layout */
    display: block;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-style: normal;
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: 0;
    padding: 2px 0;
    border-radius: 4px;
    padding-left: 20px;
    margin-bottom: 8px;
    overflow: hidden; /* clearfix */
}

.checkout-list-item span:first-child {
    float: left;
    max-width: 70%;
}

.checkout-price {
    float: right;
}

.checkout-price {
    font-family: 'Inter', sans-serif;
    margin-left: 10px;
    font-weight: 500;
    font-style: Medium;
    font-size: 14px;
    line-height: 1;
    letter-spacing: 0%;
}

.checkout-details hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    margin: 18px 0;
}

/* Notebook (até 1366px) - Base já configurada acima */

/* Monitor (1367px a 1919px) */
@media screen and (min-width: 1367px) and (max-width: 1919px) {
    .checkout-title {
        font-size: 38px;
        margin-bottom: 38px;
        padding-left: 35px;
    }

    .checkout-total {
        font-size: 21px;
        margin-bottom: 38px;
        padding-left: 35px;
    }

    .checkout-total-value {
        font-size: 21px;
    }

    .checkout-details h3 {
        font-size: 22px;
    }

    .checkout-section h4 {
        font-size: 16px;
    }

    .checkout-list-item {
        font-size: 16px;
    }

    .checkout-price {
        font-size: 16px;
    }
}

/* Ensure body background for checkout view covers and does not tile */
body[data-view="checkout"] {
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
}



/* Televisão: aumentar sidebar de avisos e ajustar layout */
/* Faixa escura de fundo da sidebar */
.checkout-sidebar-bg {
    position: fixed;
    left: 0px;
    top: 0px;
    width: 313px;
    height: 100vh;
    background: #101010;
    z-index: 9;
}

.checkout-container .header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 11;
}

.checkout-sidebar {
    position: absolute;
    left: 42px;
    top: 130px;
    width: 182px;
    z-index: 10;
    /* Fallback IE9 */
    display: block;
}

.category-btn {
    box-sizing: border-box;
    display: inline-block;
    width: auto;
    max-width: 100%;
    padding: 10px 20px;
    margin-bottom: 18px;
    background: transparent;
    opacity: 0.7;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 90px;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 18px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    /* Fallback IE9 */
    display: inline-block;
}

.category-btn:hover {
    opacity: 1;
}

.category-btn.active {
    background: rgba(193, 28, 54, 0.65);
    border: 1px solid rgba(193, 28, 54, 0.7);
    opacity: 1;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}


.checkout-content {
    position: absolute;
    top: 0px;
    left: 24.5%;
    width: 75.5%;
    height: 720px;
    overflow-y: scroll;
    overflow-x: hidden;
    padding: 145px 120px 35px 50px;
    /* Fallback IE9: sem flexbox */
    display: block;
    -webkit-transition: all 0.3s ease;
}

/* Ocultar scrollbar nativa mas manter funcionalidade de scroll */
.checkout-content {
    /* IE e Edge antigo */
    -ms-overflow-style: none;
    scrollbar-width: none; /* Firefox */
}

/* Ocultar scrollbar nativa em navegadores modernos */
.checkout-content::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Scrollbar customizada para a área de checkout */
.custom-scrollbar {
    position: fixed;
    right: 30px;
    top: 145px;
    width: 3px;
    height: 516px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 15;
    pointer-events: auto;
    opacity: 1;
}

/* Thumb (indicador de posição) da scrollbar customizada */
.custom-scrollbar-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(193, 28, 54, 0.65);
    border-radius: 10px;
    cursor: pointer;
    pointer-events: auto;
    opacity: 1;
}

.price-currency {
    font-weight: 200;
    font-style: italic;
}

.price-value {
    font-weight: 300;
    font-style: italic;
}

/* ===========================================
   MEDIA QUERIES PARA DIFERENTES TAMANHOS DE TELA
   Compatível com IE9+ e ES5
   =========================================== */

/* Monitor Desktop (1367px a 1919px) */
@media screen and (min-width: 1367px) and (max-width: 1919px) {
    .checkout-sidebar-bg {
        width: 350px;
        background: linear-gradient(90deg, #101010 27.64%, rgba(16, 16, 16, 0.85) 38.41%, rgba(16, 16, 16, 0) 65.49%);
    }

    .checkout-sidebar {
        left: 50px;
        top: 140px;
        width: 200px;
    }

    .category-btn {
        padding: 12px 24px;
        font-size: 20px;
        line-height: 24px;
        margin-bottom: 20px;
    }

    .checkout-content {
        left: 22%;
        width: 78%;
        height: 800px;
        padding: 150px 120px 40px 60px;
    }

    .custom-scrollbar {
        right: 40px;
        top: 155px;
        height: 550px;
    }

    .room-number {
        font-size: 22px;
    }

    .date-text {
        font-size: 16px;
    }

    .temp,
    .time {
        font-size: 26px;
    }

    .weather-icon {
        width: 22px;
        height: 22px;
    }

    .room-icon {
        width: 26px;
        height: 26px;
    }
}

/* Televisão e Monitores Grandes (1920px+) */
@media screen and (min-width: 1920px) {
    .checkout-sidebar-bg {
        width: 520px;
        background: linear-gradient(90deg, #101010 27.64%, rgba(16, 16, 16, 0.85) 38.41%, rgba(16, 16, 16, 0) 65.49%);
    }

    .checkout-sidebar {
        left: 80px;
        top: 200px;
        width: 320px;
    }

    .checkout-content {
        left: 34%; /* desloca conteúdo para a direita para abrir espaço ao sidebar maior */
        width: 66%;
        padding: 180px 120px 35px 90px;
    }

    .custom-scrollbar {
        right: 80px;
        top: 180px;
        width: 4px;
        height: 800px;
    }

    .category-btn {
        padding: 15px 30px;
        font-size: 24px;
        line-height: 28px;
        margin-bottom: 25px;
    }

    .checkout-content {
        left: 520px;
        width: 66%;
        height: 900px;
        padding: 180px 120px 50px 60px;
    }

    /* Aumentar tamanhos de fonte específicos da tela de checkout para TV */
    .checkout-title {
        font-size: 56px;
        line-height: 1;
    }

    .checkout-total {
        font-size: 28px;
        margin-bottom: 42px;
    }

    .checkout-total-value {
        font-size: 28px;
    }

    .checkout-details h3 {
        font-size: 28px;
    }

    .checkout-section h4 {
        font-size: 22px;
    }

    .checkout-list-item {
        font-size: 20px;
    }

    .checkout-price {
        font-size: 20px;
    }

    #checkout-qr-message {
        font-size: 20px;
    }

    .aplication-logo-checkout {
        width: 260px;
        height: 260px;
        border-radius: 28px;
    }

    /* Manter border-radius nas imagens para telas grandes */
    .aplication-logo-checkout img,
    .qr-code-img {
        border-radius: 28px;
    }
}

/* TVs maiores (QHD / 4K) */
@media screen and (min-width: 2560px) {
    .checkout-sidebar-bg {
        width: 760px;
    }

    .checkout-sidebar {
        left: 100px;
        top: 200px;
        width: 440px;
    }

    .checkout-content {
        left: 760px;
        width: calc(100% - 760px);
        padding: 220px 120px 60px 120px;
    }
}

@media screen and (min-width: 3840px) {
    .checkout-sidebar-bg {
        width: 1000px;
    }

    .checkout-sidebar {
        left: 120px;
        top: 240px;
        width: 560px;
    }

    .checkout-content {
        left: 1000px;
        width: calc(100% - 1000px);
        padding: 260px 120px 80px 140px;
    }
}