/*
 * WooCommerce Visual Calendar Builder - Frontend Styles
 * Versão Final com CSS Puro para Proporções
 */

/* ==========================================================================
   Wrapper e Grelha Principal
   ========================================================================== */

.wvc-visual-calendar-wrapper {
    max-width: 1200px;
    margin: 2em auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.wvc-visual-grid {
    display: grid;
    gap: 15px;
    /* A propriedade grid-template-columns é definida dinamicamente pelo PHP com media queries */
}


/* ==========================================================================
   Célula Individual do Calendário (Dia)
   ========================================================================== */

/* 1. O container na grelha. */
.wvc-visual-day {
    position: relative;
    display: flex; /* Permite que o conteúdo se alinhe corretamente */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* 2. O pseudo-elemento que força a proporção quadrada. */
.wvc-visual-day::before {
    content: '';
    display: block;
    padding-top: 100%; /* Força uma proporção de 1:1 (altura = 100% da largura) */
}

/* 3. O conteúdo visual, que agora é posicionado de forma absoluta dentro da célula */
.wvc-visual-day-content, 
.wvc-lock-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 8px; /* O border-radius vai para os elementos de conteúdo */
    overflow: hidden;
}

.wvc-visual-day.wvc-locked {
    cursor: not-allowed;
}

.wvc-visual-day.wvc-unlocked {
    cursor: pointer;
}

.wvc-visual-day.wvc-unlocked:hover {
    transform: scale(1.02);
    z-index: 10;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.wvc-visual-day-content {
    background-repeat: no-repeat;
    filter: grayscale(50%);
    transition: filter 0.3s ease;
}

.wvc-visual-day.wvc-unlocked:hover .wvc-visual-day-content {
    filter: grayscale(0%);
}

.wvc-visual-day.wvc-today {
    outline: 4px solid #cb9500;
    border-radius: 12px; /* Adicionar um raio à borda do outline também */
}

.wvc-visual-day.wvc-today .wvc-visual-day-content {
    filter: grayscale(0%);
}

.wvc-content-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    padding: 10px;
    box-sizing: border-box;
    /* justify-content e align-items são aplicados via PHP */
}

.wvc-visual-day-number {
    font-size: 2.5em;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
    line-height: 1.1;
    /* A cor é aplicada via PHP */
}

.wvc-lock-overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 5;
}

.wvc-lock-icon {
    font-size: 3em;
    color: #343a40;
    opacity: 0.5;
}


/* ==========================================================================
   Product Modal (Este bloco está funcional e pode permanecer como está)
   ========================================================================== */
.wvc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.wvc-modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.wvc-modal-content {
    background-color: #fff;
    border-radius: 8px;
    max-width: 95%;
    width: 450px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 50px 30px 40px;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.wvc-modal-overlay.is-visible .wvc-modal-content {
    transform: scale(1);
}

@media (min-width: 768px) {
    .wvc-modal-content {
        width: 650px;
    }
}

.wvc-modal-close {
    position: absolute !important;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: #f0f0f0;
    border: none;
    border-radius: 50% !important;
    font-size: 20px;
    line-height: 30px;
    text-align: center;
    font-weight: 300;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.wvc-modal-close:hover {
    background-color: #e0e0e0;
    color: #333;
    transform: rotate(90deg);
}

#wvc-modal-image {
    display: block;
    max-width: 100%;
    max-height: 40vh;
    height: auto;
    margin: 0 auto 25px;
    object-fit: contain;
}

#wvc-modal-title {
    font-size: 2em;
    margin: 0 0 15px;
    line-height: 1.2;
}

#wvc-modal-price {
    font-size: 2.2em; /* Aumentar o tamanho geral para dar mais impacto */
    margin: 0 0 35px;
    line-height: 1;
}

#wvc-modal-price ins .woocommerce-Price-amount {
    color: #cb9500;
    font-weight: 600;
}

#wvc-modal-price del {
    display: block;
    font-size: 0.6em;
    font-weight: 300;
    color: #333;
    opacity: 0.8;
    text-decoration: line-through;
    margin-bottom: 5px;
}

#wvc-modal-price ins {
    text-decoration: none;
}

#wvc-modal-price > .woocommerce-Price-amount {
    color: #cb9500;
    font-weight: 600;
}

#wvc-modal-link.button {
    padding: 14px 35px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    font-weight: bold;
    border: none;
    transition: opacity 0.2s ease;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#wvc-modal-link.button:hover {
    opacity: 0.85;
}

.wvc-validity-text {
    font-size: 0.9em;
    color: #333; /* Um cinzento subtil */
    margin: -15px 0 25px 0; /* Espaçamento negativo no topo para ficar mais perto do preço */
}