/* Firmas Feria Comic - Estilos */

/* SOBRESCRIBIR ESTILOS GLOBALES DEL TEMA */
.ffc-container a,
.ffc-container button,
.ffc-container a:link,
.ffc-container a:visited,
.ffc-container button:link,
.ffc-container button:visited {
    color: inherit !important;
    text-decoration: none !important;
}

.ffc-container a:focus,
.ffc-container button:focus,
.ffc-container a:active,
.ffc-container button:active {
    outline: none !important;
    box-shadow: none !important;
    color: inherit !important;
}

.ffc-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Filtros y Buscador */
.ffc-filters {
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.ffc-filters.sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    margin: 0;
    padding: 12px 20px;
    background: #ff585d;
    border-top: 10px solid #242424;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.ffc-search {
    margin-bottom: 20px;
}

.ffc-search-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 500px;
}

.ffc-filters.sticky .ffc-search {
    position: absolute;
    bottom: calc(113% + 5px);
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 0;
    z-index: 1001;
}

.ffc-search-input {
    width: 100%;
    padding: 15px 45px 15px 20px;
    font-size: 16px;
    border: 3px solid #242424;
    border-radius: 0;
    font-family: inherit;
    transition: all 0.3s ease;
    /* Prevenir zoom en iOS/Android */
    touch-action: manipulation;
}

.ffc-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #242424;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #FFD700;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 28px;
    height: 28px;
}

.ffc-search-clear svg {
    width: 14px;
    height: 14px;
    fill: #FFD700 !important;
}

.ffc-search-clear svg path {
    fill: #FFD700 !important;
}

.ffc-search-clear:hover {
    background: #000;
    transform: translateY(-50%) scale(1.1);
}

.ffc-search-clear:active {
    transform: translateY(-50%) scale(0.95);
}

.ffc-filters.sticky .ffc-search-wrapper {
    max-width: 350px;
}

.ffc-filters.sticky .ffc-search-input {
    padding: 8px 38px 8px 18px;
    font-size: 14px;
    border-radius: 0;
    background: #ffffff;
    border: 3px solid #242424;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ffc-filters.sticky .ffc-search-clear {
    right: 8px;
    width: 24px;
    height: 24px;
}

.ffc-filters.sticky .ffc-search-clear svg {
    width: 12px;
    height: 12px;
    fill: #FFD700 !important;
}

.ffc-filters.sticky .ffc-search-clear svg path {
    fill: #FFD700 !important;
}

.ffc-search-input:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.ffc-filters.sticky .ffc-search-input:focus {
    box-shadow: 0 2px 15px rgba(255, 215, 0, 0.3);
}

/* Alfabeto */
.ffc-alphabet {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ffc-alphabet.ffc-loaded {
    opacity: 1;
}

.ffc-filters.sticky .ffc-alphabet {
    margin-bottom: 0;
    gap: 6px;
    justify-content: center;
}

.ffc-letter-btn {
    padding: 10px 15px;
    background-color: #f0f0f0;
    border: 2px solid #242424;
    border-radius: 0;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    color: #000 !important;
    /* Eliminar estilos de tap/focus */
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    outline: none;
    user-select: none;
    -webkit-user-select: none;
    text-decoration: none;
}

.ffc-letter-btn:link,
.ffc-letter-btn:visited {
    color: #000 !important;
    text-decoration: none;
}

.ffc-letter-btn:hover {
    background-color: #FFD700;
    transform: translateY(-2px);
    color: #000 !important;
}

.ffc-letter-btn:focus,
.ffc-letter-btn:active {
    outline: none !important;
    border-color: #242424 !important;
    color: #000 !important;
    box-shadow: none !important;
}

.ffc-letter-btn.active {
    background-color: #000;
    color: #FFD700 !important;
}

.ffc-letter-btn.active:link,
.ffc-letter-btn.active:visited,
.ffc-letter-btn.active:hover,
.ffc-letter-btn.active:focus,
.ffc-letter-btn.active:active {
    color: #FFD700 !important;
}

.ffc-letter-btn.disabled {
    display: none;
}

/* Lista de Firmas */
.ffc-firmas-list {
    margin-top: 20px;
}

.ffc-day-group {
    margin-bottom: 40px;
}

/* Header del Día */
.ffc-day-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: #FFD700;
    color: #000;
    border: 10px solid #242424;
    border-radius: 0;
    font-weight: bold;
}

.ffc-day-name-col {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 15px 30px;
    border-right: 10px solid #242424;
}

.ffc-day-label-col {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
}

.ffc-day-name {
    font-size: 32px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ffc-day-label {
    font-size: 32px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Grid de Firmas */
.ffc-firmas-grid {
    border-left: 10px solid #242424;
    border-right: 10px solid #242424;
    border-bottom: 10px solid #242424;
    border-radius: 0;
}

/* Fila de Firma */
.ffc-firma-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 10px solid #242424;
    min-height: 60px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ffc-firma-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.ffc-firma-row:hover::before {
    background: rgba(0, 0, 0, 0.15);
}

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

.ffc-firma-row:only-child {
    border-bottom: none;
}

.ffc-firma-info,
.ffc-firma-author {
    position: relative;
    z-index: 2;
}

/* Filas alternas */
.ffc-firma-even {
    background-color: #90EE90;
}

.ffc-firma-odd {
    background-color: #F5F5F5;
}

/* Cuando hay filtros activos, todas las filas visibles son blancas */
.ffc-has-filters .ffc-firma-row {
    background-color: #F5F5F5 !important;
}

/* PERO el autor SIEMPRE mantiene su fondo visible */
.ffc-has-filters .ffc-firma-author {
    background-color: rgba(0, 0, 0, 0.18) !important;
}

/* La última firma visible en cada grupo no debe tener borde inferior */
.ffc-firma-row.ffc-last-visible {
    border-bottom: none !important;
}

/* Info de la Firma */
.ffc-firma-info {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 15px 20px;
    border-right: 10px solid #242424;
}

.ffc-location-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-right: 12px;
}

.ffc-firma-details {
    text-align: left;
}

.ffc-firma-time {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 3px;
}

.ffc-firma-location {
    font-size: 14px;
    opacity: 0.9;
}

/* Nombre del Autor */
.ffc-firma-author {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
}

/* Sin resultados */
.ffc-no-results {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #242424;
    background: #f8f8f8;
    border: 10px solid #242424;
    margin: 20px 0;
}

.ffc-no-results-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

.ffc-no-results p {
    margin: 0;
    font-weight: 600;
}

/* Ocultar elementos */
.ffc-firma-row.hidden {
    display: none;
}

.ffc-day-group.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .ffc-container {
        padding: 10px;
    }

    /* OCULTAR COMPLETAMENTE EL MENU STICKY EN MÓVIL */
    .ffc-filters.sticky {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        left: -9999px !important;
        pointer-events: none !important;
    }

    /* Filtros normales (no sticky) siguen visibles */
    .ffc-filters {
        position: static !important;
        margin-bottom: 30px !important;
        padding: 0 !important;
        background: transparent !important;
        display: block !important;
    }

    .ffc-search {
        position: static !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
        margin-bottom: 20px !important;
        z-index: 1 !important;
    }

    .ffc-filters.sticky .ffc-search {
        position: static !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
        margin-bottom: 20px !important;
        z-index: 1 !important;
    }

    .ffc-search-wrapper {
        max-width: 100% !important;
    }

    .ffc-search-input,
    .ffc-search-input:focus,
    .ffc-search-input:active,
    .ffc-search-input:hover,
    input#ffc-search-input,
    input.ffc-search-input {
        max-width: 100% !important;
        padding: 12px 45px 12px 15px !important;
        font-size: 16px !important;
        border: 3px solid #242424 !important;
        box-shadow: none !important;
        /* Prevenir zoom en móvil - MUY IMPORTANTE */
        touch-action: manipulation !important;
        -webkit-text-size-adjust: 100% !important;
        text-size-adjust: 100% !important;
        /* Asegurar que el zoom no se active */
        transform: scale(1) !important;
        zoom: 1 !important;
    }

    .ffc-search-clear {
        right: 10px !important;
        width: 28px !important;
        height: 28px !important;
        background: #242424 !important;
    }

    .ffc-search-clear:hover {
        background: #000 !important;
    }

    .ffc-search-clear svg {
        width: 14px !important;
        height: 14px !important;
        fill: #FFD700 !important;
    }

    .ffc-search-clear svg path {
        fill: #FFD700 !important;
    }

    .ffc-filters.sticky .ffc-search-input,
    .ffc-filters.sticky .ffc-search-input:focus,
    .ffc-filters.sticky .ffc-search-input:active,
    .ffc-filters.sticky input#ffc-search-input {
        max-width: 100% !important;
        padding: 12px 15px !important;
        font-size: 16px !important;
        border: 3px solid #242424 !important;
        box-shadow: none !important;
        touch-action: manipulation !important;
        -webkit-text-size-adjust: 100% !important;
        text-size-adjust: 100% !important;
    }

    .ffc-alphabet {
        gap: 5px !important;
        margin-bottom: 20px !important;
    }

    .ffc-filters.sticky .ffc-alphabet {
        gap: 5px !important;
        margin-bottom: 20px !important;
    }

    /* BOTONES ALFABETO EN MÓVIL - FORZAR NEGRO EN TODO */
    .ffc-letter-btn,
    .ffc-letter-btn:link,
    .ffc-letter-btn:visited,
    .ffc-letter-btn:hover,
    .ffc-letter-btn:active,
    .ffc-letter-btn:focus,
    .ffc-letter-btn:target,
    button.ffc-letter-btn,
    a.ffc-letter-btn,
    .ffc-alphabet .ffc-letter-btn {
        padding: 8px 12px !important;
        font-size: 12px !important;
        color: #000 !important;
        background-color: #f0f0f0 !important;
        background: #f0f0f0 !important;
        border: 2px solid #242424 !important;
        /* ANIQUILAR todos los estilos de selección */
        -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        -moz-user-select: none !important;
        -ms-user-select: none !important;
        user-select: none !important;
        outline: 0 !important;
        outline-width: 0 !important;
        outline-style: none !important;
        outline-color: transparent !important;
        box-shadow: none !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        text-shadow: none !important;
        /* Mejorar respuesta táctil */
        touch-action: manipulation !important;
        cursor: pointer !important;
        pointer-events: auto !important;
        /* Evitar delay de 300ms en móvil */
        -ms-touch-action: manipulation !important;
    }

    /* SOBRESCRIBIR cualquier estilo de link heredado del tema */
    .ffc-alphabet .ffc-letter-btn * {
        color: inherit !important;
    }

    /* Botón activo - FORZAR ESTILOS */
    .ffc-letter-btn.active,
    .ffc-letter-btn.active:link,
    .ffc-letter-btn.active:visited,
    .ffc-letter-btn.active:hover,
    .ffc-letter-btn.active:active,
    .ffc-letter-btn.active:focus,
    .ffc-letter-btn.active:target,
    button.ffc-letter-btn.active,
    a.ffc-letter-btn.active,
    .ffc-alphabet .ffc-letter-btn.active {
        background-color: #000 !important;
        background: #000 !important;
        color: #FFD700 !important;
        border: 2px solid #242424 !important;
        outline: 0 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    .ffc-alphabet .ffc-letter-btn.active * {
        color: #FFD700 !important;
    }

    /* Asegurar que sticky no muestre nada */
    .ffc-filters.sticky .ffc-letter-btn {
        display: none !important;
    }

    .ffc-day-name,
    .ffc-day-label {
        font-size: 16px;
    }

    .ffc-day-header {
        grid-template-columns: 1fr 1fr;
    }

    .ffc-day-name-col {
        padding: 10px 12px;
    }

    .ffc-day-label-col {
        padding: 10px 12px;
    }

    .ffc-firma-row {
        grid-template-columns: 1fr;
        min-height: auto;
        border-bottom: 8px solid #242424;
    }

    .ffc-firmas-grid {
        border-left: 8px solid #242424;
        border-right: 8px solid #242424;
        border-bottom: 8px solid #242424;
    }

    .ffc-day-header {
        border: 8px solid #242424;
    }

    .ffc-day-name-col {
        border-right: 8px solid #242424;
    }

    .ffc-firma-info {
        border-right: none;
        border-bottom: none;
        padding: 8px 10px;
        flex-direction: column;
        align-items: flex-start;
    }

    .ffc-location-icon {
        display: none;
    }

    .ffc-firma-author {
        padding: 16px 15px !important;
        font-size: 22px !important;
        font-weight: 900 !important;
        background-color: rgba(0, 0, 0, 0.18) !important;
        line-height: 1.3 !important;
    }

    .ffc-firma-time {
        font-size: 13px;
        margin-bottom: 2px;
    }

    .ffc-firma-location {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .ffc-day-name,
    .ffc-day-label {
        font-size: 14px;
    }

    .ffc-day-name-col,
    .ffc-day-label-col {
        padding: 8px 10px;
    }

    .ffc-firma-author {
        font-size: 21px !important;
        font-weight: 900 !important;
        padding: 16px 12px !important;
        background-color: rgba(0, 0, 0, 0.18) !important;
        line-height: 1.3 !important;
    }

    .ffc-firma-info {
        padding: 10px 12px;
    }

    .ffc-firma-time {
        font-size: 13px;
        font-weight: 700;
    }

    .ffc-firma-location {
        font-size: 12px;
    }

    /* Bordes más gruesos en móviles pequeños */
    .ffc-firma-row {
        border-bottom: 8px solid #242424;
    }

    .ffc-firmas-grid {
        border-left: 8px solid #242424;
        border-right: 8px solid #242424;
        border-bottom: 8px solid #242424;
    }

    .ffc-day-header {
        border: 8px solid #242424;
    }

    .ffc-day-name-col {
        border-right: 8px solid #242424;
    }

    /* Extra agresivo para móviles pequeños */
    .ffc-letter-btn,
    .ffc-letter-btn *,
    button.ffc-letter-btn {
        padding: 6px 10px !important;
        font-size: 11px !important;
        color: #000 !important;
    }

    .ffc-letter-btn.active,
    .ffc-letter-btn.active *,
    button.ffc-letter-btn.active {
        background-color: #000 !important;
        background: #000 !important;
        color: #FFD700 !important;
    }
}

/* Loading State */
.ffc-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ffc-firma-row {
    animation: fadeIn 0.3s ease;
}

/* Print Styles */
@media print {
    .ffc-filters {
        display: none;
    }

    .ffc-firma-row {
        break-inside: avoid;
    }

    .ffc-firma-row:hover {
        transform: none;
        box-shadow: none;
    }
}
