/**
 * Estilos Front-end - Eventos CGU (Estilo EventON)
 * 
 * @author Claudio Moreira <cmoreira@unicamp.br>
 * @since 1.0.1
 */

/* === CALENDÁRIO - LISTA DE EVENTOS === */

.ecgu-calendar {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ecgu-month-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 0 20px;
}

.ecgu-month-title,
.ecgu-calendar .ecgu-month-title {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #1a1a2e !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    line-height: 1 !important;
    white-space: nowrap;
}

.ecgu-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    background: #fff;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.ecgu-nav-btn:hover {
    border-color: #0073aa;
    color: #0073aa;
    background: #f0f8ff;
}

.ecgu-nav-btn svg {
    width: 18px;
    height: 18px;
}

.ecgu-month-events {
    transition: opacity 0.2s ease;
}

.ecgu-month-header {
    display: none;
}

.ecgu-month-group {
    margin-bottom: 0;
}

.ecgu-row {
    border-bottom: 1px solid #e8edf2;
}

.ecgu-row:last-child {
    border-bottom: none;
}

.ecgu-row-bar {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
    gap: 20px;
    border-left: 4px solid #00a66a;
}

.ecgu-row-bar:hover {
    background: #f4f8fb;
}

.ecgu-row.ecgu-row-open .ecgu-row-bar {
    background: #eef5f0;
}

.ecgu-row-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    width: 54px;
    height: 54px;
    background: #f0f4f8;
    border-radius: 10px;
    flex-shrink: 0;
}

.ecgu-row-day {
    font-size: 22px;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1;
}

.ecgu-row-month {
    font-size: 11px;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1;
    margin-top: 2px;
}

.ecgu-row-info {
    flex: 1;
    min-width: 0;
}

.ecgu-row-title,
.ecgu-calendar .ecgu-row-title {
    margin: 0 0 4px !important;
    padding: 0 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1a1a2e !important;
    line-height: 1.3 !important;
    border: none !important;
    letter-spacing: 0 !important;
}

.ecgu-row-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.ecgu-row-time,
.ecgu-row-location {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #6c757d;
}

.ecgu-row-time svg,
.ecgu-row-location svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.ecgu-row-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.ecgu-row-cat {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.ecgu-row-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    color: #6c757d;
    transition: all 0.2s ease;
    padding: 0;
}

.ecgu-row-toggle:hover {
    background: #e9ecef;
    color: #333;
}

.ecgu-row.ecgu-row-open .ecgu-row-toggle svg {
    transform: rotate(180deg);
}

.ecgu-row-toggle svg {
    transition: transform 0.3s ease;
}

/* === DETALHES EXPANDIDOS === */

.ecgu-row-detail {
    background: #f8fafb;
    border-top: 1px solid #e8edf2;
    overflow: hidden;
}

.ecgu-row-detail-inner {
    display: flex;
    gap: 24px;
    padding: 24px 20px 24px 98px;
}

.ecgu-row-detail-image {
    flex-shrink: 0;
    width: 200px;
}

.ecgu-row-detail-image img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
}

.ecgu-row-detail-content {
    flex: 1;
    min-width: 0;
}

.ecgu-detail-item {
    margin-bottom: 8px;
    font-size: 14px;
    color: #495057;
    line-height: 1.5;
}

.ecgu-detail-item strong {
    color: #1a1a2e;
}

.ecgu-detail-item small {
    color: #6c757d;
}

.ecgu-detail-desc {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e8edf2;
    color: #555;
}

.ecgu-detail-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.ecgu-detail-btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    background: #e9ecef;
    color: #495057;
}

.ecgu-detail-btn:hover {
    background: #dee2e6;
    color: #333;
}

.ecgu-detail-btn-primary {
    background: #00a66a;
    color: #fff;
}

.ecgu-detail-btn-primary:hover {
    background: #008a57;
    color: #fff;
}

/* === DESTAQUES === */

.ecgu-eventos-destaques {
    display: grid;
    gap: 24px;
    margin: 20px 0;
}

.ecgu-event-destaque {
    display: flex;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
}

.ecgu-event-destaque:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.ecgu-event-destaque-image {
    position: relative;
    flex-shrink: 0;
    width: 280px;
}

.ecgu-event-destaque-image img {
    width: 100%;
    height: 100%;
    min-height: 200px;
    object-fit: cover;
}

.ecgu-badge-destaque {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #f0b849, #e6a020);
    color: #fff;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ecgu-event-destaque-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ecgu-event-date {
    color: #00a66a;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.ecgu-event-title {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.3;
}

.ecgu-event-title a {
    color: #1a1a2e;
    text-decoration: none;
}

.ecgu-event-title a:hover {
    color: #00a66a;
}

.ecgu-event-excerpt {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.ecgu-btn-destaque {
    display: inline-block;
    padding: 10px 24px;
    background: #00a66a;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.ecgu-btn-destaque:hover {
    background: #008a57;
    color: #fff;
}

.ecgu-frontend-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ecgu-form-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.ecgu-form-section:last-of-type {
    border-bottom: none;
}

.ecgu-form-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.ecgu-form-field {
    margin-bottom: 20px;
}

.ecgu-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.ecgu-form-field .required {
    color: #e74c3c;
}

.ecgu-form-field input[type="text"],
.ecgu-form-field input[type="email"],
.ecgu-form-field input[type="url"],
.ecgu-form-field input[type="tel"],
.ecgu-form-field input[type="date"],
.ecgu-form-field input[type="time"],
.ecgu-form-field input[type="number"],
.ecgu-form-field select,
.ecgu-form-field textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.ecgu-form-field input:focus,
.ecgu-form-field select:focus,
.ecgu-form-field textarea:focus {
    outline: none;
    border-color: #00a66a;
}

.ecgu-form-field small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.ecgu-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.ecgu-form-submit {
    text-align: center;
    margin-top: 30px;
}

.ecgu-submit-btn {
    padding: 15px 40px;
    background: #00a66a;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.ecgu-submit-btn:hover {
    background: #008a57;
}

.ecgu-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.ecgu-form-messages {
    margin: 20px 0;
}

.ecgu-message {
    padding: 20px 24px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
    animation: ecguFadeIn 0.4s ease;
}

@keyframes ecguFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ecgu-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.ecgu-message-success svg {
    flex-shrink: 0;
    stroke: #155724;
    margin-top: 2px;
}

.ecgu-message-success strong {
    font-size: 16px;
    display: block;
    margin-bottom: 4px;
}

.ecgu-message-success span {
    font-size: 13px;
    color: #1e7e34;
}

.ecgu-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ecgu-message-error ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.ecgu-message-error li {
    margin-bottom: 4px;
    font-size: 13px;
}

.ecgu-no-events {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

/* === SINGLE EVENTO - ESTILO EVENTON === */

.ecgu-single-eventon {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ecgu-se-header {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: #f8fafb;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e8edf2;
}

.ecgu-se-header-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.ecgu-se-header-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ecgu-se-header-info {
    flex: 1;
    min-width: 0;
}

.ecgu-se-header-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.ecgu-se-date-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border: 2px solid #0073aa;
    border-radius: 6px;
    padding: 4px 10px;
    line-height: 1;
}

.ecgu-se-date-badge strong {
    font-size: 18px;
    color: #0073aa;
}

.ecgu-se-date-badge small {
    font-size: 10px;
    font-weight: 700;
    color: #0073aa;
    text-transform: uppercase;
}

.ecgu-se-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ecgu-se-status-aberto {
    background: #d4edda;
    color: #155724;
}

.ecgu-se-status-encerrado {
    background: #e2e3e5;
    color: #383d41;
}

.ecgu-se-status-cancelado {
    background: #f8d7da;
    color: #721c24;
}

.ecgu-se-status-lotado {
    background: #fff3cd;
    color: #856404;
}

.ecgu-se-cat-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: #e8f4fd;
    color: #0073aa;
    text-transform: uppercase;
}

.ecgu-se-header-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #495057;
    margin-bottom: 4px;
}

.ecgu-se-header-location svg {
    flex-shrink: 0;
}

.ecgu-se-header-org {
    font-size: 13px;
    color: #6c757d;
}

.ecgu-se-featured-img {
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
}

.ecgu-se-featured-img img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.ecgu-se-section {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e8edf2;
}

.ecgu-se-section-title,
.ecgu-single-eventon .ecgu-se-section-title {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #0073aa !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    border: none !important;
}

.ecgu-se-section-title svg {
    flex-shrink: 0;
}

.ecgu-se-description {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
}

.ecgu-se-info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e8edf2;
}

.ecgu-se-info-box {
    padding: 20px;
    background: #f8fafb;
    border-radius: 8px;
    border: 1px solid #e8edf2;
}

.ecgu-se-info-title,
.ecgu-single-eventon .ecgu-se-info-title {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #0073aa !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    border: none !important;
}

.ecgu-se-info-text {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    margin: 0 0 4px;
    line-height: 1.4;
}

.ecgu-se-info-sub {
    font-size: 13px;
    color: #6c757d;
    margin: 0 0 6px;
}

.ecgu-se-info-link {
    font-size: 13px;
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.ecgu-se-info-link:hover {
    text-decoration: underline;
}

.ecgu-se-organizer {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.ecgu-se-organizer-avatar {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4f8;
    border-radius: 50%;
}

.ecgu-se-organizer-info {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

.ecgu-se-organizer-info a {
    color: #0073aa;
    text-decoration: none;
}

.ecgu-se-organizer-info a:hover {
    text-decoration: underline;
}

.ecgu-se-org-phone {
    color: #6c757d;
}

.ecgu-se-cta {
    text-align: center;
    padding: 24px 0;
    margin-bottom: 20px;
}

.ecgu-se-cta-btn {
    display: inline-block;
    padding: 14px 40px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: 0 3px 12px rgba(0, 115, 170, 0.3);
}

.ecgu-se-cta-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(0, 115, 170, 0.4);
    color: #fff;
}

.ecgu-se-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.ecgu-se-tag {
    display: inline-block;
    padding: 5px 14px;
    background: #e9ecef;
    color: #495057;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ecgu-se-tag:hover {
    background: #0073aa;
    color: #fff;
}

.ecgu-se-calendar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    margin-bottom: 8px;
    border-top: 1px solid #e8edf2;
}

.ecgu-se-calendar-actions svg {
    flex-shrink: 0;
}

.ecgu-se-cal-link {
    font-size: 14px;
    font-weight: 600;
    color: #0073aa;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ecgu-se-cal-link:hover {
    text-decoration: underline;
    color: #005a87;
}

.ecgu-se-cal-sep {
    color: #ccc;
    font-size: 14px;
}

.ecgu-se-share {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 20px 0;
    border-top: 1px solid #e8edf2;
}

.ecgu-se-share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f0f4f8;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ecgu-se-share-icon:hover {
    background: #0073aa;
    color: #fff;
}

.ecgu-se-share-icon svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 768px) {
    .ecgu-se-header {
        flex-direction: column;
    }
    
    .ecgu-se-header-thumb {
        width: 60px;
        height: 60px;
    }
    
    .ecgu-se-info-row {
        grid-template-columns: 1fr;
    }
}

/* === RESPONSIVO GERAL === */

@media (max-width: 768px) {
    .ecgu-row-bar {
        padding: 12px 14px;
        gap: 12px;
    }
    
    .ecgu-row-date {
        min-width: 46px;
        width: 46px;
        height: 46px;
    }
    
    .ecgu-row-day {
        font-size: 18px;
    }
    
    .ecgu-row-title {
        font-size: 14px;
    }
    
    .ecgu-row-cat {
        display: none;
    }
    
    .ecgu-row-detail-inner {
        flex-direction: column;
        padding: 16px;
    }
    
    .ecgu-row-detail-image {
        width: 100%;
    }
    
    .ecgu-row-detail-image img {
        height: 180px;
    }
    
    .ecgu-event-destaque {
        flex-direction: column;
    }
    
    .ecgu-event-destaque-image {
        width: 100%;
        height: 200px;
    }
    
    .ecgu-event-destaque-image img {
        height: 200px;
    }
    
    .ecgu-form-row {
        grid-template-columns: 1fr;
    }
    
    .ecgu-frontend-form-wrapper {
        padding: 20px;
    }
}
