/* Importar Tipografía Inter desde Google Fonts con pesos completos y alta legibilidad */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

html, body, button, input, select, textarea {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    letter-spacing: -0.011em;
}

/* Safe Area Insets para dispositivos Apple (iPhone con notch / Dynamic Island y Home Bar) */
.pt-safe {
    padding-top: env(safe-area-inset-top, 20px);
}
.pb-safe {
    padding-bottom: env(safe-area-inset-bottom, 20px);
}
.mb-safe {
    margin-bottom: env(safe-area-inset-bottom, 20px);
}

/* Ocultar barras de scroll pero permitir deslizamiento táctil nativo */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Normalización de tarjetas inyectadas por PHP (cuestionarios.php) adaptadas a Tailwind / Apple Card */
#cuestionarios-container .row {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
}
@media (min-width: 640px) {
    #cuestionarios-container .row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (min-width: 1024px) {
    #cuestionarios-container .row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (min-width: 1280px) {
    #cuestionarios-container .row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1.25rem;
    }
}

#cuestionarios-container .col-md-6,
#cuestionarios-container .col-lg-4 {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

#cuestionarios-container .card {
    background: #ffffff;
    border-radius: 1.25rem !important;
    border: 1px solid rgba(229, 231, 235, 0.8) !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.03) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
    height: 100%;
}
/* Radio button group personalizado para cuestionarios en admin */
#cuestionarios input.btn-check,
#cuestionarios input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    margin: 0;
}

#cuestionarios {
    width: 100%;
    box-sizing: border-box;
}

#cuestionarios label {
    user-select: none;
    -webkit-user-select: none;
    box-sizing: border-box;
    max-width: 100%;
}

#cuestionarios-container .card-body {
    padding: 1.25rem !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}
#cuestionarios-container .card-title {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
    line-height: 1.35 !important;
}

/* Badges de dimensiones */
#cuestionarios-container .dim-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    background-color: rgba(46, 125, 110, 0.08);
    color: #2e7d6e;
    display: inline-flex;
    align-items: center;
}
#cuestionarios-container .badge-success {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    background-color: #ecfdf5;
    color: #059669;
}
#cuestionarios-container .badge-warning {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    background-color: #fffbeb;
    color: #d97706;
}

/* Botones dentro de las tarjetas */
#cuestionarios-container .btn-primary {
    background-color: #2e7d6e !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 0.825rem !important;
    padding: 0.4rem 0.9rem !important;
    border-radius: 9999px !important;
}
#cuestionarios-container .btn-outline-success {
    background-color: #ecfdf5 !important;
    border: 1px solid #10b981 !important;
    color: #059669 !important;
    font-weight: 600 !important;
    font-size: 0.825rem !important;
    padding: 0.4rem 0.9rem !important;
    border-radius: 9999px !important;
}
#cuestionarios-container .btn-outline-secondary {
    background-color: #f3f4f6 !important;
    border: 1px solid #e5e7eb !important;
    color: #4b5563 !important;
    font-weight: 600 !important;
    font-size: 0.825rem !important;
    padding: 0.4rem 0.9rem !important;
    border-radius: 9999px !important;
}

/* ============================================================== */
/* ESTILOS NATIVOS APPLE / HIG PARA FULLCALENDAR RESPONSIVO      */
/* ============================================================== */
.fc {
    font-family: inherit !important;
    --fc-border-color: rgba(229, 231, 235, 0.7);
    --fc-button-bg-color: #f3f4f6;
    --fc-button-border-color: rgba(229, 231, 235, 0.9);
    --fc-button-text-color: #374151;
    --fc-button-hover-bg-color: #e5e7eb;
    --fc-button-hover-border-color: #d1d5db;
    --fc-button-active-bg-color: #2e7d6e;
    --fc-button-active-border-color: #2e7d6e;
    --fc-today-bg-color: rgba(46, 125, 110, 0.05);
}

.fc .fc-toolbar {
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.25rem !important;
}

.fc .fc-toolbar-title {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    color: #111827;
    letter-spacing: -0.02em;
}

.fc .fc-button {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    padding: 0.4rem 0.75rem !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.15s ease;
    text-transform: capitalize;
}

.fc .fc-button-primary:not(:disabled).fc-button-active, 
.fc .fc-button-primary:not(:disabled):active {
    background-color: #2e7d6e !important;
    border-color: #2e7d6e !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px 0 rgba(46, 125, 110, 0.25);
}

.fc .fc-button-group {
    border-radius: 0.75rem;
    overflow: hidden;
}

.fc .fc-button-group > .fc-button {
    border-radius: 0 !important;
    margin: 0 !important;
}

.fc .fc-button-group > .fc-button:first-child {
    border-top-left-radius: 0.75rem !important;
    border-bottom-left-radius: 0.75rem !important;
}

.fc .fc-button-group > .fc-button:last-child {
    border-top-right-radius: 0.75rem !important;
    border-bottom-right-radius: 0.75rem !important;
}

.fc .fc-col-header-cell {
    padding: 0.5rem 0 !important;
    background: #f9fafb;
}

.fc .fc-col-header-cell-cushion {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
}

.fc-theme-standard td, .fc-theme-standard th {
    border-color: rgba(229, 231, 235, 0.7) !important;
}

.fc-daygrid-day-number {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4b5563;
    padding: 4px 6px !important;
}

.fc-event {
    border-radius: 6px !important;
    padding: 2px 4px !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Ajustes específicos para móviles */
@media (max-width: 639px) {
    .fc .fc-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    .fc .fc-toolbar-chunk {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    .fc .fc-toolbar-title {
        font-size: 0.95rem !important;
        text-align: center;
        width: 100%;
    }
    .fc-list-event-title, .fc-list-event-time {
        font-size: 0.8rem !important;
    }
    .fc-list-day-cushion {
        background: #f3f4f6 !important;
        padding: 6px 12px !important;
        font-size: 0.75rem !important;
        font-weight: 700 !important;
    }
}

