/**
 * Fullgass Event Calendar - Estilos frontend.
 * Temática motera: negro, rojo, blanco. Mobile-first y responsive.
 */

.fgec-wrapper {
        --fgec-red: #e10600;
        --fgec-red-dark: #b30000;
        --fgec-black: #111111;
        --fgec-gray: #f2f2f2;
        --fgec-gray-2: #e0e0e0;
        --fgec-text: #1a1a1a;
        --fgec-muted: #777;
        --fgec-radius: 12px;
        --fgec-shadow: 0 6px 24px rgba(0, 0, 0, 0.10);
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
        color: var(--fgec-text);
        max-width: 1100px;
        margin: 0 auto;
        box-sizing: border-box;
}

.fgec-wrapper *,
.fgec-wrapper *::before,
.fgec-wrapper *::after {
        box-sizing: border-box;
}

/* ---------- Botones ---------- */
.fgec-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 10px 18px;
        border-radius: 8px;
        border: 2px solid transparent;
        font-weight: 600;
        font-size: 14px;
        text-decoration: none;
        cursor: pointer;
        transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
        line-height: 1.2;
}
.fgec-btn:hover { transform: translateY(-2px); }
.fgec-btn-primary { background: var(--fgec-red); color: #fff; }
.fgec-btn-primary:hover { background: var(--fgec-red-dark); color: #fff; }
.fgec-btn-dark { background: var(--fgec-black); color: #fff; }
.fgec-btn-dark:hover { background: #000; color: #fff; }
.fgec-btn-outline { background: transparent; color: var(--fgec-black); border-color: var(--fgec-black); }
.fgec-btn-outline:hover { background: var(--fgec-black); color: #fff; }
.fgec-btn-ghost { background: transparent; color: var(--fgec-red); border-color: var(--fgec-red); }
.fgec-btn-ghost:hover { background: var(--fgec-red); color: #fff; }
.fgec-btn-block { width: 100%; margin-bottom: 10px; }
.fgec-btn-lg { padding: 14px 28px; font-size: 16px; }

.fgec-ico { font-style: normal; }

/* ---------- Filtros ---------- */
.fgec-filters {
        display: flex;
        flex-wrap: wrap;
        gap: 14px;
        align-items: flex-end;
        background: #fff;
        padding: 18px;
        border-radius: var(--fgec-radius);
        box-shadow: var(--fgec-shadow);
        margin-bottom: 22px;
}
.fgec-filter-group { display: flex; flex-direction: column; flex: 1; min-width: 140px; }
.fgec-filter-group label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--fgec-muted); margin-bottom: 6px; }
.fgec-filter {
        padding: 9px 12px;
        border: 1px solid var(--fgec-gray-2);
        border-radius: 8px;
        font-size: 14px;
        background: #fff;
}
.fgec-filter:focus { outline: none; border-color: var(--fgec-red); box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.12); }
.fgec-filter-clear { flex: 0 0 auto; }

/* ---------- Calendario ---------- */
.fgec-calendar {
        background: #fafafa;
        border: 1px solid var(--fgec-gray-2);
        border-radius: var(--fgec-radius);
        box-shadow: var(--fgec-shadow);
        overflow: hidden;
        position: relative;
}
.fgec-cal-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 18px 20px;
        flex-wrap: wrap;
        gap: 12px;
        background: #fff;
        border-bottom: 1px solid var(--fgec-gray-2);
}
.fgec-cal-nav { display: flex; gap: 8px; align-items: center; }
.fgec-nav-btn, .fgec-today-btn {
        background: var(--fgec-red);
        color: #fff;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        font-weight: 700;
        transition: background 0.2s ease;
}
.fgec-nav-btn { width: 34px; height: 32px; font-size: 18px; line-height: 1; }
.fgec-today-btn { padding: 0 14px; height: 32px; font-size: 13px; }
.fgec-nav-btn:hover, .fgec-today-btn:hover { background: var(--fgec-red-dark); }
.fgec-cal-title {
        color: var(--fgec-red);
        font-weight: 800;
        font-size: 26px;
        margin: 0;
        letter-spacing: 1px;
        text-align: center;
        flex: 1;
}

.fgec-cal-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.fgec-cal-table thead th {
        padding: 10px 6px;
        font-size: 11px;
        text-transform: lowercase;
        color: var(--fgec-muted);
        font-weight: 600;
        border: 1px solid var(--fgec-gray-2);
        background: #fff;
        text-align: center;
}
.fgec-cal-day {
        border: 1px solid var(--fgec-gray-2);
        height: 96px;
        vertical-align: top;
        padding: 6px;
        position: relative;
        transition: background 0.15s ease;
}
.fgec-cal-day:hover { background: #fff; }
.fgec-day-num { font-size: 13px; color: var(--fgec-red); font-weight: 600; }
.fgec-cal-day-out { background: #f7f7f7; }
.fgec-cal-day-out .fgec-day-num { color: #ccc; }
.fgec-cal-today { background: #fbf6d6; }
.fgec-cal-today .fgec-day-num {
        background: var(--fgec-red);
        color: #fff;
        border-radius: 50%;
        width: 24px;
        height: 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
}
.fgec-day-events { margin-top: 4px; display: flex; flex-direction: column; gap: 3px; }
.fgec-day-event {
        display: block;
        font-size: 11px;
        padding: 3px 6px;
        border-radius: 4px;
        background: var(--fgec-red);
        color: #fff !important;
        text-decoration: none;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        transition: transform 0.12s ease, opacity 0.2s;
}
.fgec-day-event:hover { transform: scale(1.02); opacity: 0.92; }
.fgec-day-event.fgec-cat-competencias { background: var(--fgec-black); }

/* ---------- Grid de tarjetas (lista) ---------- */
.fgec-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 22px;
}
.fgec-card {
        background: #fff;
        border-radius: var(--fgec-radius);
        overflow: hidden;
        box-shadow: var(--fgec-shadow);
        display: flex;
        flex-direction: column;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.fgec-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.16); }
.fgec-card-thumb {
        position: relative;
        display: block;
        height: 180px;
        background: linear-gradient(135deg, #1a1a1a, #444);
        overflow: hidden;
}
.fgec-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fgec-card-noimg { display:flex; align-items:center; justify-content:center; height:100%; font-size:54px; }
.fgec-card-cat {
        position: absolute;
        top: 10px;
        left: 10px;
        background: var(--fgec-red);
        color: #fff;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        padding: 4px 10px;
        border-radius: 20px;
        letter-spacing: 0.5px;
}
.fgec-card-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.fgec-card-title { font-size: 18px; margin: 0 0 10px; line-height: 1.3; }
.fgec-card-title a { color: var(--fgec-black); text-decoration: none; }
.fgec-card-title a:hover { color: var(--fgec-red); }
.fgec-card-meta { font-size: 13px; color: var(--fgec-muted); margin: 2px 0; display: flex; gap: 6px; align-items: center; }
.fgec-card-tags { margin: 10px 0; display: flex; gap: 6px; flex-wrap: wrap; }
.fgec-tag {
        font-size: 11px;
        font-weight: 700;
        padding: 3px 10px;
        border-radius: 20px;
        text-transform: uppercase;
        letter-spacing: 0.4px;
}
.fgec-tag-alcance { background: var(--fgec-gray); color: var(--fgec-black); }
.fgec-tag-cat { background: var(--fgec-red); color: #fff; }
.fgec-card .fgec-btn { margin-top: auto; }

/* ---------- Paginación ---------- */
.fgec-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.fgec-page-btn {
        min-width: 38px;
        height: 38px;
        border: 1px solid var(--fgec-gray-2);
        background: #fff;
        border-radius: 8px;
        cursor: pointer;
        font-weight: 600;
        transition: all 0.18s ease;
}
.fgec-page-btn:hover { border-color: var(--fgec-red); color: var(--fgec-red); }
.fgec-page-btn.is-active { background: var(--fgec-red); color: #fff; border-color: var(--fgec-red); }

/* ---------- Estado vacío ---------- */
.fgec-empty { text-align: center; padding: 60px 20px; color: var(--fgec-muted); }
.fgec-empty-ico { font-size: 48px; display: block; margin-bottom: 12px; }

/* ---------- Loading ---------- */
.fgec-loading { position: relative; min-height: 200px; opacity: 0.5; pointer-events: none; }
.fgec-loading::after {
        content: "";
        position: absolute;
        top: 50%; left: 50%;
        width: 40px; height: 40px;
        margin: -20px 0 0 -20px;
        border: 4px solid var(--fgec-gray-2);
        border-top-color: var(--fgec-red);
        border-radius: 50%;
        animation: fgec-spin 0.8s linear infinite;
}
@keyframes fgec-spin { to { transform: rotate(360deg); } }

/* ---------- Formulario ---------- */
.fgec-submit-wrapper { background: #ededed; padding: 32px; border-radius: var(--fgec-radius); }
.fgec-submit-title { font-size: 28px; font-weight: 800; margin: 0 0 22px; color: var(--fgec-black); }
.fgec-form-row { display: flex; flex-direction: column; margin-bottom: 16px; }
.fgec-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fgec-form label { font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.fgec-req { color: var(--fgec-red); }
.fgec-form input[type="text"],
.fgec-form input[type="url"],
.fgec-form input[type="date"],
.fgec-form input[type="time"],
.fgec-form input[type="file"],
.fgec-form select,
.fgec-form textarea {
        padding: 12px 14px;
        border: 1px solid var(--fgec-gray-2);
        border-radius: 8px;
        font-size: 15px;
        width: 100%;
        background: #fff;
}
.fgec-form input:focus,
.fgec-form select:focus,
.fgec-form textarea:focus { outline: none; border-color: var(--fgec-red); box-shadow: 0 0 0 3px rgba(225,6,0,0.12); }
.fgec-form-actions { margin-top: 10px; }
.fgec-form-note { font-size: 13px; color: var(--fgec-muted); margin-top: 10px; }

/* ---------- Notices / Login ---------- */
.fgec-notice { padding: 14px 18px; border-radius: 8px; margin-bottom: 18px; font-weight: 500; }
.fgec-notice-success { background: #e3f6e8; color: #1a7d33; border: 1px solid #b6e5c2; }
.fgec-notice-error { background: #fde8e8; color: var(--fgec-red-dark); border: 1px solid #f5c2c2; }
.fgec-login-required { display: flex; justify-content: center; padding: 30px 0; }
.fgec-login-box { background: #fff; padding: 40px; border-radius: var(--fgec-radius); box-shadow: var(--fgec-shadow); text-align: center; max-width: 480px; }
.fgec-login-ico { font-size: 46px; display: block; margin-bottom: 12px; }
.fgec-login-box h3 { margin: 0 0 10px; font-size: 22px; }
.fgec-login-actions { display: flex; gap: 12px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

/* ---------- Single ---------- */
.fgec-single { padding: 10px 0 40px; }
.fgec-back-link { display: inline-block; margin-bottom: 16px; color: var(--fgec-muted); text-decoration: none; font-weight: 600; }
.fgec-back-link:hover { color: var(--fgec-red); }
.fgec-single-tags { display: flex; gap: 8px; margin-bottom: 10px; }
.fgec-single-title { font-size: 34px; font-weight: 800; margin: 0 0 20px; color: var(--fgec-black); line-height: 1.15; }
.fgec-single-hero { border-radius: var(--fgec-radius); overflow: hidden; margin-bottom: 26px; box-shadow: var(--fgec-shadow); }
.fgec-single-hero img { width: 100%; display: block; max-height: 460px; object-fit: cover; }
.fgec-single-layout { display: grid; grid-template-columns: 1fr 340px; gap: 30px; align-items: start; }
.fgec-single-content { font-size: 16px; line-height: 1.7; }
.fgec-single-map { margin-top: 28px; }
.fgec-single-map h3 { font-size: 20px; margin-bottom: 12px; }
.fgec-info-card, .fgec-share-card { background: #fff; border-radius: var(--fgec-radius); box-shadow: var(--fgec-shadow); padding: 22px; margin-bottom: 20px; }
.fgec-info-card h3, .fgec-share-card h3 { margin: 0 0 16px; font-size: 18px; border-bottom: 3px solid var(--fgec-red); padding-bottom: 8px; display: inline-block; }
.fgec-info-list { list-style: none; margin: 0 0 18px; padding: 0; }
.fgec-info-list li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; font-size: 14px; }
.fgec-info-list .fgec-ico { font-size: 20px; }
.fgec-share-buttons { display: flex; gap: 10px; }
.fgec-share {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        color: #fff !important;
        text-decoration: none;
        border: none;
        cursor: pointer;
        transition: transform 0.15s ease, opacity 0.2s;
        font-weight: 700;
        padding: 0;
        line-height: 1;
        flex-shrink: 0;
}
.fgec-share:hover { transform: translateY(-3px); opacity: 0.9; }
.fgec-share-fb { background: #1877f2; }
.fgec-share-tw { background: #000; }
.fgec-share-wa { background: #25d366; }
.fgec-share-copy { 
        background: var(--fgec-red);
        font-size: 20px;
        padding: 0;
        margin: 0;
        overflow: hidden;
}
.fgec-copy-feedback { display: inline-block; margin-top: 10px; color: #1a7d33; font-size: 13px; font-weight: 600; }

/* ---------- Modal ---------- */
.fgec-modal { position: fixed; inset: 0; z-index: 9999; display: none; }
.fgec-modal.is-open { display: block; }
.fgec-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); animation: fgec-fade 0.2s ease; }
.fgec-modal-content {
        position: relative;
        background: #fff;
        max-width: 520px;
        margin: 8vh auto;
        border-radius: var(--fgec-radius);
        padding: 28px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        animation: fgec-pop 0.22s ease;
}
.fgec-modal-close { position: absolute; top: 10px; right: 14px; background: none; border: none; font-size: 28px; cursor: pointer; color: var(--fgec-muted); line-height: 1; }
.fgec-modal-close:hover { color: var(--fgec-red); }
@keyframes fgec-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fgec-pop { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Archive header ---------- */
.fgec-archive-wrap { max-width: 1100px; margin: 0 auto; padding: 30px 16px; }
.fgec-archive-header h1 { color: var(--fgec-red); font-weight: 800; }
.fgec-archive-header p { color: var(--fgec-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
        .fgec-single-layout { grid-template-columns: 1fr; }
        .fgec-cal-title { font-size: 20px; flex: 1 1 100%; order: 3; }
}
@media (max-width: 600px) {
        .fgec-form-grid { grid-template-columns: 1fr; }
        .fgec-cal-day { height: 70px; padding: 3px; }
        .fgec-day-event { font-size: 9px; padding: 2px 3px; }
        .fgec-cal-table thead th { font-size: 9px; padding: 6px 2px; }
        .fgec-single-title { font-size: 26px; }
        .fgec-submit-wrapper { padding: 20px; }
        .fgec-filters { padding: 14px; }
}



/* ---------- Nominatim Autocomplete (OpenStreetMap) ---------- */
.fgec-suggestions {
        position: absolute;
        z-index: 9999;
        background: white;
        border: 2px solid var(--fgec-gray-2);
        border-radius: 8px;
        box-shadow: var(--fgec-shadow);
        list-style: none;
        margin: 4px 0 0 0;
        padding: 0;
        max-height: 240px;
        overflow-y: auto;
        width: 100%;
        display: none;
}
.fgec-suggestions li {
        padding: 10px 14px;
        cursor: pointer;
        border-bottom: 1px solid var(--fgec-gray-2);
        font-size: 14px;
        transition: background 0.15s ease;
}
.fgec-suggestions li:last-child {
        border-bottom: none;
}
.fgec-suggestions li:hover {
        background: var(--fgec-gray);
        color: var(--fgec-red);
}

/* ---------- Leaflet Map fixes ---------- */
.fgec-single-map .leaflet-container {
        border-radius: 12px;
        z-index: 1;
}



/* ============================================================
   Estado CANCELADO — overlay sobre la imagen
   ============================================================ */
.fgec-single-hero { position: relative; }
.fgec-card-thumb { position: relative; }

.fgec-cancel-overlay {
        position: absolute;
        inset: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        /* Fondo translúcido para que se siga viendo la imagen detrás. */
        background: rgba(0, 0, 0, 0.45);
        z-index: 5;
        pointer-events: none;
        text-align: center;
        padding: 12px;
}

.fgec-cancel-text {
        display: inline-block;
        font-weight: 800;
        letter-spacing: 4px;
        color: #fff;
        text-transform: uppercase;
        font-size: clamp(28px, 6vw, 64px);
        line-height: 1.05;
        border: 4px solid #fff;
        border-radius: 8px;
        padding: 8px 24px;
        background: rgba(179, 0, 0, 0.55);
        transform: rotate(-8deg);
        text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.fgec-cancel-reason {
        display: inline-block;
        color: #fff;
        font-size: clamp(13px, 2.2vw, 18px);
        font-weight: 600;
        background: rgba(0, 0, 0, 0.55);
        padding: 4px 14px;
        border-radius: 20px;
}

/* Versión pequeña para tarjetas en listados/calendario. */
.fgec-cancel-overlay-sm .fgec-cancel-text {
        letter-spacing: 2px;
        font-size: clamp(16px, 4vw, 26px);
        border-width: 3px;
        padding: 4px 14px;
}

/* La tarjeta cancelada se atenúa levemente. */
.fgec-card-cancelled .fgec-card-body { opacity: 0.85; }
.fgec-card-cancelled .fgec-card-title a { text-decoration: line-through; text-decoration-color: rgba(179,0,0,0.6); }



/* ========================================
   Página "Mis eventos" - Estilos de tabla
   ======================================== */

.fgec-my-events-wrapper {
        margin: 2rem auto;
        max-width: 1200px;
}

.fgec-my-events-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.5rem;
        flex-wrap: wrap;
        gap: 1rem;
}

.fgec-my-events-header h2 {
        margin: 0;
        font-size: clamp(1.5rem, 4vw, 2rem);
        color: var(--fgec-primary);
}

.fgec-table {
        width: 100%;
        border-collapse: collapse;
        background: #fff;
        border: 1px solid var(--fgec-border);
        border-radius: var(--fgec-radius);
        overflow: hidden;
        box-shadow: var(--fgec-shadow);
}

.fgec-table thead {
        background: var(--fgec-dark);
        color: #fff;
}

.fgec-table thead th {
        padding: 0.875rem 1rem;
        text-align: left;
        font-weight: 700;
        font-size: 0.9rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
}

.fgec-table tbody tr {
        border-bottom: 1px solid var(--fgec-border);
        transition: background 0.2s ease;
}

.fgec-table tbody tr:hover {
        background: #f9f9f9;
}

.fgec-table tbody td {
        padding: 1rem;
        vertical-align: middle;
}

.fgec-table .fgec-no-image {
        color: #ccc;
        font-size: 1.5rem;
}

.fgec-table .fgec-actions {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
}

.fgec-btn-sm {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
}

.fgec-btn-edit {
        background: #0073aa;
        color: #fff;
}

.fgec-btn-edit:hover {
        background: #005a87;
}

.fgec-btn-delete {
        background: var(--fgec-accent);
        color: #fff;
}

.fgec-btn-delete:hover {
        background: #a30000;
}

/* Responsive: en móvil, convertir tabla en tarjetas */
@media (max-width: 768px) {
        .fgec-table thead {
                display: none;
        }

        .fgec-table,
        .fgec-table tbody,
        .fgec-table tr,
        .fgec-table td {
                display: block;
                width: 100%;
        }

        .fgec-table tr {
                margin-bottom: 1rem;
                border: 1px solid var(--fgec-border);
                border-radius: var(--fgec-radius);
                padding: 1rem;
                background: #fff;
        }

        .fgec-table td {
                padding: 0.5rem 0;
                border: none;
                text-align: left;
                position: relative;
                padding-left: 45%;
        }

        .fgec-table td::before {
                content: attr(data-label);
                position: absolute;
                left: 0;
                width: 40%;
                padding-right: 10px;
                font-weight: 700;
                text-transform: uppercase;
                font-size: 0.8rem;
                color: var(--fgec-dark);
        }

        .fgec-table .fgec-actions {
                padding-left: 0;
                justify-content: flex-start;
        }
}
