/**
 * Estilos para o Addon WooCommerce Calendário de Tours
 * @version 1.0.2 (Ajuste de margem título mobile)
 */

/* --- 1. Contentor do Calendário --- */
.wct-calendar-wrapper {
    max-width: 100%;
    margin: 0 auto;
    background: #fff;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Ajustes ao FullCalendar */
.wct-calendar-instance {
    font-size: 0.85em; 
}

.wct-calendar-instance .fc-toolbar-title {
    font-size: 1.1em !important;
    font-weight: bold;
}

.wct-calendar-instance .fc-button {
    padding: 0.2em 0.4em !important; 
    font-size: 0.9em !important;
}

/* Estilo para dias com disponibilidade */
.fc-day.wct-day-available {
    background-color: #e3f2fd !important;
    cursor: pointer;
    transition: background-color 0.2s;
}

.fc-day.wct-day-available:hover {
    background-color: #bbdefb !important;
}

.fc-event {
    cursor: pointer;
}

/* --- 2. O Modal (Popup) --- */
#wct-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

#wct-modal-overlay.wct-open {
    opacity: 1;
    visibility: visible;
}

#wct-modal-content {
    background: #fff;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#wct-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #555;
    z-index: 10;
}

#wct-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background-color: #f9f9f9;
}

#wct-modal-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #333;
}

#wct-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

/* --- 3. Loader --- */
.wct-loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: wct-spin 1s linear infinite;
    margin: 30px auto;
}

@keyframes wct-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- 4. Lista de Produtos --- */
.wct-product-card {
    display: flex;
    border: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.wct-product-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.wct-prod-img {
    width: 150px;
    flex-shrink: 0;
    background-color: #f0f0f0;
}

.wct-prod-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wct-prod-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.wct-prod-info h4 {
    margin: 0 0 10px 0; /* Margem Desktop Padrão */
    font-size: 1.1em;
}

.wct-prod-info h4 a {
    text-decoration: none;
    color: #333;
}

.wct-prod-desc {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.4;
}

.wct-prod-prices table {
    width: 100%;
    margin-bottom: 15px;
    border-collapse: collapse;
    background-color: #fcfcfc;
}

.wct-prod-prices td {
    padding: 6px 10px;
    border-bottom: 1px solid #eee;
    font-size: 0.9em;
    color: #444;
}

.wct-prod-prices td:last-child {
    text-align: right;
    white-space: nowrap;
}

.wct-prod-prices td small {
    display: block;
    font-size: 0.8em;
    color: #888;
    margin-top: 2px;
}

.wct-btn-reservar {
    align-self: flex-end;
    background-color: #28a745 !important;
    color: #fff !important;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9em;
    text-align: center;
    transition: background-color 0.2s;
}

.wct-btn-reservar:hover {
    background-color: #218838 !important;
}

/* --- 5. Mobile --- */
@media (max-width: 600px) {
    .wct-product-card {
        flex-direction: column;
    }

    .wct-prod-img {
        width: 100%;
        height: 150px;
    }

    /* Regra específica para Mobile: Margem superior de 50px */
    .wct-prod-info h4 {
        margin: 50px 0 10px 0;
    }

    .wct-btn-reservar {
        width: 100%;
        align-self: center;
    }
}