/* =========================
   BASE
========================= */
.post-calendar-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    font-family: Arial, Helvetica, sans-serif;
}

#pcm-form {
    margin-bottom: 20px;
}

#pcm-form input,
#pcm-form textarea,
#pcm-form select,
#pcm-form button {
    width: 100%;
    margin-bottom: 8px;
    padding: 8px;
    box-sizing: border-box;
}

.media-field {
    display: flex;
    gap: 6px;
}

.media-field input {
    flex: 1;
}

.media-field button {
    white-space: nowrap;
}

/* =========================
   CONTROLES DO CALENDÁRIO
========================= */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.calendar-controls button {
    cursor: pointer;
    padding: 6px 12px;
}

/* =========================
   CALENDÁRIO DESKTOP
========================= */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-day {
    border: 1px solid #ddd;
    min-height: 140px;
    padding: 6px;
    background: #fff;
}

.calendar-day.empty {
    background: transparent;
    border: none;
}

.date {
    font-weight: bold;
    margin-bottom: 6px;
}

/* =========================
   POST CARD
========================= */
.post-card {
    margin-top: 6px;
    padding: 6px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: background 0.2s;
}

.post-card:hover {
    background: #eee;
}

.post-card strong {
    display: block;
    margin-bottom: 4px;
}

/* =========================
   STATUS
========================= */
.status {
    display: inline-block;
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 4px;
    margin-top: 4px;
    text-transform: capitalize;
}

.status.pendente {
    background: #ffe8a1;
}

.status.publicado {
    background: #cce5ff;
}

.status.aprovado {
    background: #d4edda;
}

/* =========================
   MODAL
========================= */
.pcm-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 9999;
}

.pcm-modal-content {
    background: #fff;
    max-width: 500px;
    margin: 10% auto;
    padding: 20px;
    position: relative;
}

.pcm-modal img,
.pcm-modal video {
    width: 100%;
    margin-top: 10px;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    font-size: 22px;
}

/* =========================
   MOBILE — AGENDA HORIZONTAL
========================= */
@media (max-width: 768px) {

    .calendar-grid {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        padding-bottom: 12px;
        scroll-snap-type: x mandatory;
    }

    .calendar-day {
        min-width: 85%;
        flex-shrink: 0;
        border: 1px solid #ddd;
        padding: 12px;
        scroll-snap-align: start;
    }

    .calendar-day.empty {
        display: none;
    }

    .date {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .post-card {
        margin-left: 0;
        padding: 10px;
    }

    .calendar-controls {
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 2;
        padding: 6px 0;
    }
}
