/*
 * Styles for the public-facing side of ADQChiado Event Manager.
 * Mobile-first responsive design with WoodMart theme integration.
 */

/* ============================================
   SINGLE EVENT PAGE STYLES (WoodMart Integration)
   ============================================ */

/* Hero Header / Page Title - Full Width */
.adq-event-page-title-wrapper {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    background-size: cover;
    background-position: center center;
    background-attachment: scroll;
    background-repeat: no-repeat;
    position: relative;
    min-height: 450px; /* Aumentado para desktop */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    padding: 0;
}

.adq-event-page-title-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.adq-event-page-title-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 40px 20px;
}

.adq-event-page-title-text {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 20px 0;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

@media (min-width: 768px) {
    .adq-event-page-title-wrapper {
        min-height: 600px; /* Mais altura em desktop para evitar cortes */
        padding: 80px 0;
    }

    .adq-event-page-title-text {
        font-size: 48px;
    }
}

@media (min-width: 1024px) {
    .adq-event-page-title-text {
        font-size: 56px;
    }
}

.adq-event-status-container {
    margin-top: 15px;
}

/* Main Content Area */
.adq-event-single {
    max-width: 100%;
    margin-top: 0;
    margin-bottom: 60px;
}

.adq-event-article {
    background: transparent;
}

/* Sections */
.adq-event-section {
    margin-bottom: 40px;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #667eea;
}

.adq-event-section:last-child {
    margin-bottom: 0;
}

.adq-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 25px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

@media (min-width: 768px) {
    .adq-section-title {
        font-size: 24px;
    }
}

/* Status Badge */
.adq-event-status-badge {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.adq-event-status-badge.status-em_preparacao {
    background: #f1c40f;
}

.adq-event-status-badge.status-concluido {
    background: #2ecc71;
}

.adq-event-status-badge.status-cancelado {
    background: #e74c3c;
}

/* Grid layout for details */
.adq-event-datetime,
.adq-event-what-details,
.adq-who-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .adq-event-datetime,
    .adq-event-what-details,
    .adq-who-details {
        grid-template-columns: 1fr 1fr;
    }
}

.adq-datetime-item,
.adq-detail-item,
.adq-who-item {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #eee;
}

.adq-label {
    display: block;
    font-weight: 700;
    color: #83b735;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.adq-value {
    font-size: 18px;
    color: #2d2d2d;
    font-weight: 500;
}

.adq-event-description {
    margin-top: 30px;
    padding: 0;
}

.adq-event-description h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.adq-description-content {
    line-height: 1.8;
    color: #666;
}

.adq-event-observations {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-left: 4px solid #764ba2;
    border-radius: 6px;
}

.adq-event-observations h3 {
    font-size: 14px;
    font-weight: 700;
    color: #764ba2;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.adq-event-observations p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

/* Location Styles */
.adq-location-main,
.adq-location-notes {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #eee;
    margin-bottom: 15px;
}

.adq-location-main h3,
.adq-location-notes h3 {
    font-size: 14px;
    font-weight: 700;
    color: #f97316;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.adq-location-text {
    font-size: 16px;
    color: #333;
    margin: 0;
    font-weight: 500;
}

.adq-location-notes p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

/* FLYER Section */
.adq-flyer-container {
    text-align: center;
}

.adq-flyer-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ============================================
   EVENTS GRID STYLES
   ============================================ */

.adq-events-grid-container {
    margin: 30px 0;
}

.adq-events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

@media (min-width: 640px) {
    .adq-events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .adq-events-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Event Card */
.adq-event-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.adq-event-card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}

.adq-event-card-image {
    height: 220px;
    position: relative;
    overflow: hidden;
}

.adq-card-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.adq-event-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.adq-event-card-title {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.adq-event-card-meta {
    margin-bottom: 20px;
    color: #777;
    font-size: 14px;
}

.adq-event-card-button {
    margin-top: auto;
    display: inline-block;
    padding: 10px 20px;
    background: #83b735;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.adq-event-card-button:hover {
    background: #6a962a;
    color: #fff;
}

/* ============================================
   CALENDAR STYLES
   ============================================ */

.adq-event-calendar-container {
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fc {
    font-family: inherit;
}

.fc .fc-button-primary {
    background-color: #667eea;
    border-color: #667eea;
}

.fc .fc-button-primary:hover {
    background-color: #5568d3;
}

.fc .fc-button-primary.fc-button-active {
    background-color: #764ba2;
    border-color: #764ba2;
}

.fc .fc-daygrid-day.fc-day-today {
    background-color: rgba(102, 126, 234, 0.1);
}

/* ============================================
   CALENDAR RESPONSIVENESS FIXES
   ============================================ */

@media (max-width: 767px) {
    .fc .fc-toolbar {
        flex-direction: column;
        gap: 10px;
    }

    .fc .fc-toolbar-title {
        font-size: 1.2em !important;
    }

    .fc .fc-button {
        padding: 0.4em 0.65em !important;
        font-size: 0.85em !important;
    }

    /* Ajustar o cabeçalho dos dias da semana */
    .fc .fc-col-header-cell-cushion {
        font-size: 0.8em;
        padding: 5px 2px !important;
    }

    /* Ajustar o conteúdo das células */
    .fc .fc-daygrid-day-number {
        font-size: 0.85em;
        padding: 4px !important;
    }

    .fc .fc-event-title {
        font-size: 0.75em !important;
        white-space: normal !important;
    }

    .fc .fc-daygrid-event {
        margin-top: 1px !important;
        padding: 1px 2px !important;
    }
    
    /* Esconder botões menos importantes em mobile se necessário */
    .fc .fc-today-button {
        display: none !important;
    }
}

/* ============================================
   SIDEBAR LAYOUT
   ============================================ */

.adq-event-single .container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.adq-event-main-content {
    flex: 1;
    min-width: 0; /* Fix for flexbox overflow */
}

.adq-event-sidebar {
    width: 100%;
}

@media (min-width: 1024px) {
    .adq-event-sidebar {
        width: 300px;
        flex-shrink: 0;
    }
}

.adq-event-sidebar .widget {
    margin-bottom: 30px;
    padding: 25px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.adq-event-sidebar .widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
}

/* ============================================
   EVENT DETAILS TABLE STYLE
   ============================================ */

.adq-event-details-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: #fff;
}

.adq-event-details-table tr {
    border-bottom: 1px solid #eee;
}

.adq-event-details-table tr:last-child {
    border-bottom: none;
}

.adq-event-details-table th,
.adq-event-details-table td {
    padding: 15px 20px;
    text-align: left;
    vertical-align: top;
}

.adq-event-details-table th {
    width: 30%;
    background-color: #f8f8f8;
    color: #333;
    font-weight: 600;
    font-size: 15px;
}

.adq-event-details-table td {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .adq-event-details-table th {
        width: 40%;
        padding: 12px 15px;
    }
    .adq-event-details-table td {
        padding: 12px 15px;
    }
}

/* ============================================
   SIDEBAR SPECIFIC WIDGET FIXES
   ============================================ */

/* Calendário na Sidebar */
.adq-event-sidebar .fc {
    font-size: 0.85em;
}

.adq-event-sidebar .fc .fc-toolbar {
    flex-direction: column;
    gap: 5px;
}

.adq-event-sidebar .fc .fc-toolbar-title {
    font-size: 1.1em !important;
}

.adq-event-sidebar .fc .fc-button {
    padding: 2px 5px !important;
    font-size: 0.8em !important;
}

/* Esconder botões de vista na sidebar para poupar espaço */
.adq-event-sidebar .fc .fc-header-toolbar .fc-toolbar-chunk:last-child {
    display: none;
}

/* Grelha de Eventos na Sidebar (Transformar em Lista) */
.adq-event-sidebar .adq-events-grid {
    grid-template-columns: 1fr !important; /* Forçar uma coluna */
    gap: 15px;
}

.adq-event-sidebar .adq-event-card {
    flex-direction: row; /* Imagem ao lado do texto */
    height: auto;
    align-items: center;
    padding: 10px;
}

.adq-event-sidebar .adq-event-card-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 4px;
}

.adq-event-sidebar .adq-event-card-content {
    padding: 0 0 0 15px;
}

.adq-event-sidebar .adq-event-card-title {
    font-size: 14px;
    margin-bottom: 5px;
    line-height: 1.3;
}

.adq-event-sidebar .adq-event-card-meta {
    font-size: 12px;
    margin-bottom: 5px;
}

.adq-event-sidebar .adq-event-card-button {
    display: none; /* Esconder botão na sidebar para ser mais compacto */
}

/* Tornar o card inteiro clicável na sidebar */
.adq-event-sidebar .adq-event-card {
    cursor: pointer;
    position: relative;
}

.adq-event-sidebar .adq-event-card-title a::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* ============================================
   EVENT INTRO SECTION (NEW LAYOUT)
   ============================================ */

.adq-event-intro-section {
    margin-bottom: 40px;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-top: 5px solid #83b735;
}

.adq-intro-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #83b735;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.adq-intro-title {
    font-size: 36px;
    font-weight: 800;
    color: #2d2d2d;
    margin: 0 0 30px 0;
    line-height: 1.1;
}

.adq-event-intro-description {
    margin-top: 20px;
    padding-top: 25px;
    border-top: 1px solid #f0f0f0;
}

.adq-description-text {
    font-size: 18px;
    line-height: 1.8;
    color: #555;
}

.adq-description-text p {
    margin-bottom: 1.5em;
}

@media (max-width: 767px) {
    /* Esconder ícone de menu indesejado (hambúrguer fantasma) */
    .adq-event-single .wd-tools-element.wd-header-mobile-nav,
    .adq-event-single .wd-header-mobile-nav,
    .adq-event-single .mobile-nav-icon,
    .adq-event-single .wd-sidebar-opener,
    .adq-event-single [class*="sidebar-opener"],
    .adq-event-single .wd-action-btn.wd-style-icon.wd-burger-icon,
    div.wd-sidebar-opener.wd-action-btn.wd-style-icon.wd-burger-icon {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
    }

    .adq-event-intro-section {
        padding: 25px;
    }
    
    .adq-intro-title {
        font-size: 28px;
    }
    
    .adq-description-text {
        font-size: 16px;
    }
}
