/* ============================================================
   🌙 FLATPICKR - Tema Dark Gold Deluxe (Correção: column-gap/row-gap)
   ============================================================ */

/* 1️⃣ Container principal */
#calendar-container {
    width: 70%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible !important;
    position: relative;
    margin: 0 auto;
    z-index: 10;
}

/* 2️⃣ Calendário principal */
.flatpickr-calendar {
    background: #171717 !important;
    border-radius: 13px !important;
    border:none;
    color: #ffba00 !important;
    font-family: "Poppins", sans-serif !important;
    transition: all 0.25s ease;
    overflow: visible !important;
}

/* 3️⃣ Calendário inline (centralizado e sem corte) */
.flatpickr-calendar.inline {
    width: 100% !important;
    max-width: 720px !important;
    min-width: 340px;
    margin: 0 auto !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    padding: 22px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

/* ============================================================
   Cabeçalho
   ============================================================ */
.flatpickr-months {
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent !important;
    color: #ffba00 !important;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.flatpickr-current-month {
    font-size: 18px !important;
    color: #ffba00 !important;
}

.flatpickr-prev-month,
.flatpickr-next-month {
    color: #ffba00 !important;
    transition: all 0.2s ease;
    font-size: 20px !important;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
    color: #ffd65c !important;
    transform: scale(1.2);
}

/* ============================================================
   Corpo e estrutura
   ============================================================ */
.flatpickr-innerContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100% !important;
    gap: 18px;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 auto !important;
}

/* Remove display:flex dos dias e garante alinhamento grid */
.flatpickr-days {
    display: block !important;
    width: 100% !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 auto !important;
}

/* ============================================================
   Grid dos dias e nomes (USANDO column-gap e row-gap para controle separado)
   ============================================================ */
   
.flatpickr-weekdaycontainer,
.dayContainer {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    justify-items: center !important;
    align-items: center !important;

    /* Substituí o gap genérico por column-gap + row-gap */
    column-gap: 0px !important;
    row-gap: 6px !important;

    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* ============================================================
   Dias e nomes
   ============================================================ */
/* Mantive tamanho fixo dos cells — se preferir, pode usar padding em vez de width/height */
.flatpickr-weekday,
.flatpickr-day {
    width: 42px !important;
    height: 42px !important;
    line-height: 42px !important;
    text-align: center !important;
    box-sizing: border-box !important;
    border-radius: 10px !important;
    transition: all 0.25s ease;
    font-size: 14px !important;
    overflow: visible !important;
}

/* Semana (nomes) */
.flatpickr-weekday {
    color: #ccc !important;
    font-weight: 500 !important;
    font-size: 0.85rem !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dia padrão */
.flatpickr-day {
    background: #2c2d31 !important;
    color: #fff !important;
    border: 1px solid transparent !important;
}

/* Hover */
.flatpickr-day:hover {
    background: #3a3b40 !important;
    border-color: #ffba00 !important;
    color: #ffba00 !important;
}

/* Dia atual */
.flatpickr-day.today {
    background: #3a3b40 !important;
    border: 1px solid #ffba00 !important;
    color: #ffba00 !important;
}

/* Selecionado */
.flatpickr-day.selected {
    background: #ffba00 !important;
    color: #242528 !important;
    font-weight: bold !important;
    box-shadow: 0 0 10px rgba(255, 186, 0, 0.6);
}

/* Fora do mês */
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: rgba(255, 255, 255, 0.2) !important;
}

/* ============================================================
   Correção de overflow em containers
   ============================================================ */
form#appointment-form,
section.content-container,
.container {
    overflow: visible !important;
}

/* ============================================================
   Animação ao abrir
   ============================================================ */
.flatpickr-calendar.animate.open {
    animation: fadeZoomIn 0.35s ease;
}

@keyframes fadeZoomIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================================
   🟡 DROPDOWN DE MESES (estilo luxuoso e escuro)
   ============================================================ */


/* Dropdown com z-index alto para não ser sobreposto */


   .flatpickr-monthDropdown-months {
    background:#000000 !important;
    border: none;
    color: #ffba00 !important;
    border-radius: 8px !important;
    font-family: "Poppins", sans-serif !important;
    font-weight: 500 !important;
    padding: 6px 10px !important;
    outline: none !important;
    transition: all 0.25s ease;
}

/* Itens individuais do select */
.flatpickr-monthDropdown-months option {
    background: #171717 !important;
    color: #fff !important;
    padding: 8px !important;
}


/* ============================================================
   🟡 FLECHAS DE NAVEGAÇÃO DO MÊS
   ============================================================ */
.flatpickr-prev-month,
.flatpickr-next-month {
    color: #ffba00 !important;
    font-size: 22px !important;
    transition: all 0.25s ease;
    padding: 6px;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
    color: #ffd65c !important;
    transform: scale(1.25);
    text-shadow: 0 0 8px rgba(255, 186, 0, 0.5);
}

/* Ícones SVG internos (corrige casos em que o Flatpickr usa <svg>) */
.flatpickr-prev-month svg,
.flatpickr-next-month svg {
    fill: #ffba00 !important;
    transition: all 0.25s ease;
}

.flatpickr-prev-month:hover svg,
.flatpickr-next-month:hover svg {
    fill: #ffd65c !important;
}


/* ============================================================
   Responsividade
   ============================================================ */
@media (max-width: 768px) {
    .flatpickr-calendar.inline {
        width: 90% !important;
    }

    .flatpickr-weekday,
    .flatpickr-day {
        width: 36px !important;
        height: 36px !important;
        line-height: 36px !important;
    }

    /* ajustar column-gap em telas menores para manter alinhamento visual */
    .flatpickr-weekdaycontainer,
    .dayContainer {
        column-gap: 8px !important;
        row-gap: 6px !important;
    }
}

/* ============================================================
   🌙 FLECHINHA DO DROPDOWN (mesma cor das setas do ano)
   ============================================================ */

/* Estilo do select de meses */
.flatpickr-monthDropdown-months {
    background: #171717 !important; /* mesmo fundo do calendário */
    color: #ffba00 !important;
    border: none;
    border-radius: 8px !important;
    padding: 4px 24px 4px 8px !important;
    appearance: none !important; /* remove estilo nativo */
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    position: relative;
    font-family: "Poppins", sans-serif !important;
    font-weight: 500 !important;
    cursor: pointer;
}

/* 🚫 Remove QUALQUER borda ou sombra do calendário */
.flatpickr-calendar,
.flatpickr-calendar::before,
.flatpickr-calendar::after {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    background-clip: padding-box !important;
}
