﻿

/* 1. LAYOUT GLOBAL */
.rsv-page-container {
    min-height: 88vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #f8fafc;
}

.rsv-page-container {
    min-height: 63vh;
}

.rsv-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
    background-color: #ededed;
    border-radius: 20px;
    min-height: 63vh;
}

/* 2. PAGE INTRO */
.rsv-intro {
    margin-bottom: 2rem;
}

    .rsv-intro h1 {
        font-size: 2.25rem;
        font-weight: 700;
        color: #333333;
        margin: 0;
    }

    .rsv-intro p {
        font-size: 1.125rem;
        color: #555555;
        margin-top: 0.25rem;
    }

/* 3. TICKET CARD (CONTAINER) */
.rsv-ticket-card {
    background-color: #ffffff;
    border: 1px solid #cecece;
    border-radius: 1rem;
    overflow: visible; /* Necessário para o Popover */
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    transition: all 0.3s ease;
    margin-bottom: 1.25rem;
    position: relative;
}

    .rsv-ticket-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
        border-color: #cbd5e1;
    }


.rsv-ticket-main {
    display: flex;
    flex-direction: row;
}

/* 4. DATE BOX SECTION */
.rsv-date-box {
    position: relative;
    background-color: #f1f5f9;
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    border-right: 1px dashed #cbd5e1;
    border-bottom: none;
    gap: 0.5rem;
}
.rsv-date-year {
    display: none;
}
.rsv-cutout {
    position: absolute;
    width: 1.5rem;
    background-color: #f8fafc;
    border-radius: 50%;
    z-index: 10;
    display: block;
}

.rsv-date-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.rsv-date-day {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1;
    color: #0f172a;
}

.rsv-date-month {
    font-size: 0.875rem;
    font-weight: 600;
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rsv-time-badge {
    background-color: #e2e8f0;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
}

/* 5. TICKET INFO SECTION */
.rsv-ticket-info {
    flex: 1;
    padding: 1.5rem;
}

.rsv-ticket-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 1rem 0;
}

.rsv-details-list {
    display: flex;
    flex-direction: column;
    gap: 0rem;
}

.rsv-detail-item {
    padding: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 1rem;
    color: #64748b;
}

    .rsv-detail-item svg {
        color: #64748b;
        flex-shrink: 0;
        margin-top: 0.125rem;
    }

.rsv-address-wrapper {
    display: flex;
    flex-direction: row;
}

.rsv-link-map {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #3b82f6;
    font-weight: 500;
    text-decoration: none;
    margin-left: 0.75rem;
}

    .rsv-link-map:hover {
        text-decoration: underline;
    }

.rsv-warning-box {
    background-color: #fef9c3;
    border: 1px solid #fde047;
    color: #854d0e;
    font-size: 0.95rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

/* 6. TICKET ACTIONS SECTION */
.rsv-ticket-action {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    background-color: transparent;
    border-left: 1px dashed #cbd5e1;
    border-top: none;
}

.rsv-btn-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background-color: #ffffff;
    border: 2px solid #cecece;
    color: #0f172a;
}

    .rsv-btn-toggle:hover {
        border-color: #3b82f6;
        color: #3b82f6;
        box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
    }

    .rsv-btn-toggle.rsv-active {
        background-color: #0f172a;
        color: #f8fafc;
        border-color: #0f172a;
        box-shadow: 0 0 10px rgba(0,0,0,0.2);
    }

/* 7. EXPANDED LIST ITEMS */
.rsv-details-expanded {
    background-color: rgba(241, 245, 249, 0.5);
    border-top: 1px solid #e2e8f0;
}

.rsv-expanded-content {
    padding: 1.5rem;
}

    .rsv-expanded-content h4 {
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: #64748b;
        margin: 0 0 1rem 0;
    }

.rsv-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rsv-item-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    flex-direction: row; 
    align-items: center;
    gap: 1rem;
    transition: border-color 0.2s;
}

    .rsv-item-card:hover {
        border-color: #3b82f6;
    }

.rsv-item-id-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.rsv-item-icon {
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.rsv-item-text {
    min-width: 100px;
    display: flex;
    flex-direction: column;
}

.rsv-item-label {
    font-size: 1.1rem;
    color: #64748b;
}

.rsv-item-code {
    font-size: 1.3rem;
    font-weight: 600;
    color: #0f172a;
}

.rsv-item-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* 8. INTERACTION & POPOVER */
.rsv-btn-invite {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    background-color: #0f172a;
    color: #ffffff;
    transition: all 0.2s;
}

    .rsv-btn-invite:hover {
        opacity: 0.9;
    }

    .rsv-btn-invite.rsv-copied {
        background-color: #16a34a;
        color: white;
    }

.rsv-info-icon {
    width: 1.75rem;
    height: 1.75rem;
    background-color: #FFE900;
    color: #854d0e;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: help;
}

.rsv-popover-container {
    position: relative;
    display: inline-block;
    cursor: help;
}

.rsv-popover-content {
    visibility: hidden;
    width: 200px;
    background-color: #f1f5f9;
    border: 1px solid #cecece;
    color: black;
    text-align: center;
    border-radius: 0.5rem;
    padding: 0.75rem;
    position: absolute;
    z-index: 100;
    bottom: 135%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    font-size: 1rem;
    font-weight: 450;
    line-height: 1.4;
    pointer-events: none;
}

    .rsv-popover-content strong {
        display: block;
        margin-bottom: 0.25rem;
        color: red;
    }

    .rsv-popover-content::after {
        content: "";
        position: absolute;
        top: 100%;
        left: 50%;
        margin-left: -5px;
        border-width: 5px;
        border-style: solid;
        border-color: #0f172a transparent transparent transparent;
    }

.rsv-popover-container:hover .rsv-popover-content {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

/* 9. STATUS BADGES */
.rsv-status-badge {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 1.1rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.rsv-badge-success, .badge-success {
    background-color: #36c180;
    color: #fff;
    -webkit-text-stroke: #99f2e4;
}

.rsv-badge-warning, .badge-warning {
    background-color: #feb600;
    color: #fef3fe;
    -webkit-text-stroke: #f4d369;
}

.rsv-badge-destructive, .badge-destructive {
    background-color: red;
    color: #fff;
    border: 1px solid #f5c6cb;
}

.rsv-badge-muted, .badge-muted {
    background-color: #f1f5f9;
    color: #64748b;
}

/* 10. ANIMATIONS & UTILS */
.rsv-capitalize {
    text-transform: capitalize;
}

@keyframes rsvFadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rsvSlideDown {
    from {
        opacity: 0;
        max-height: 0;
    }

    to {
        opacity: 1;
        max-height: 5000px;
    }
}

.rsv-animate-fade {
    animation: rsvFadeInUp 0.4s ease-out forwards;
}

.rsv-animate-slide {
    animation: rsvSlideDown 0.5s ease-in-out forwards;
}

.rsv-empty-state {
    text-align: center;
    padding: 4rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rsv-empty-icon {
    width: 6rem;
    height: 6rem;
    background-color: #f1f5f9;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.rsv-btn-primary {
    background-color: #3b82f6;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1.5rem;
    display: inline-block;
}

/* 11. UNIFIED MEDIA QUERIES (TABLET & MOBILE) */
@media (max-width: 768px) {
    .rsv-expanded-content{
        padding: 1rem;
    }
    .rsv-ticket-main {
        flex-direction: column;
    }

    .rsv-date-box {
        flex-direction: row;
        justify-content: center; 
        align-items: center;
        width: 100%;
        border-right: none;
        border-bottom: 1px dashed #cbd5e1;
        gap: 0; 
        padding: 1rem;
    }
    .rsv-time-badge {
        order: -1;
        background-color: transparent;
        color: #0f172a;
        font-weight: 800; 
        font-size: 0.9rem;
        padding: 0;
    }
    .rsv-time-badge::after {
        content: "|";
        margin: 0 8px;
        color: #cecece;
        font-weight: normal;
    }
    .rsv-date-content {
        flex-direction: row;
        align-items: center;
        gap: 0;
    }

    .rsv-date-day {
        font-size: 0.9rem;
        font-weight: 600;
        line-height: 1;
    }
    .rsv-date-day::after {
        content: "|";
        margin: 0 8px;
        color: #cecece;
        font-weight: normal;
    }

    .rsv-date-month {
        font-size: 0.9rem;
        color: #0f172a; 
    }

    .rsv-date-month::after {
        content: "|";
        margin: 0 8px;
        color: #cecece;
        font-weight: normal;
    }

    .rsv-date-year {
        display: block;
        font-size: 0.9rem;
        font-weight: 600;
        color: #64748b;
    }

    .rsv-cutout {
        display: none;
    }
    .rsv-item-card {
        border: 1px solid #cecece;
        border-radius: 12px; /* Arredondado conforme sua imagem */
        padding: 1rem;
        /* Define que os itens principais (Topo e Botões) ficam um embaixo do outro */
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        box-sizing: border-box; /* Garante que padding não estoure a largura */
    }

    .rsv-item-id-wrapper {
        display: flex;
        align-items: center; 
        width: 100%;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .rsv-status-badge {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        font-size: 1.2rem; 
        white-space: nowrap; 
    }
    /* ITEM 3: Ações (Ícone Info + Botão Convidar) - VAI PARA A LINHA DE BAIXO */
    .rsv-item-actions {
        grid-column: 1 / -1; 
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center; 
        gap: 1rem;
        margin-top: 0.5rem;
        padding-top: 0.75rem;
        border-top: 1px dashed #e2e8f0;
    }

    /* Garante que o ícone de info (do popover) apareça e tenha tamanho bom */
    .rsv-info-icon {
        width: 2rem;
        height: 2rem;
    }

    /* Botão convidar ocupa espaço total ou fixo */
    .rsv-btn-invite {
        flex: 1; 
        justify-content: center;
        padding: 0.6rem;
    }

    .rsv-popover-content {
        visibility: hidden;
        width: 200px;
        padding: 0.5rem;
        position: absolute;
        z-index: 100;
        bottom: 100%;
        left: 160%;
        transform: translateX(-50%);
        line-height: 1.4;
    }

        .rsv-popover-content::after {
            top: 100%;
            left: 30%;
            border-style: solid;
            border-color: #0f172a transparent transparent transparent;
        }

    .rsv-cutout {
        display: none;
    }


    .rsv-status-badge{
        text-align: center;
    }

    .rsv-ticket-action {
        width: 100%;
        border-left: none;
        border-top: 1px dashed #cbd5e1;
        background-color: rgba(241, 245, 249, 0.5);
    }

    /* ESCONDE O ÍCONE NO MOBILE PARA DAR ESPAÇO NA LINHA ÚNICA */
    .rsv-item-icon {
        display: none;
    }
}

@media (max-width: 420px){
    .rsv-status-badge {
        margin-left: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        font-size: 0.9rem;
        white-space: nowrap;
    }
}
