/**
 * CSS: Control de Ingreso
 * Archivo: assets/css/control-ingreso-shortcode.css
 */

/* ── Wrapper principal ──────────────────────────────────────────────── */
.ci-wrapper {
    max-width: 720px;
    margin: 0 auto;
    font-family: sans-serif;
    position: relative;
}

/* ── Zona de captura ────────────────────────────────────────────────── */
.ci-captura-zona {
    position: relative;
    margin-bottom: 24px;
}

.ci-captura-label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 6px;
    font-weight: 600;
}

.ci-captura-row {
    display: flex;
    gap: 8px;
}

.ci-input-codigo {
    flex: 1;
    padding: 12px 16px;
    font-size: 18px;
    border: 2px solid #ccc;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
}

.ci-input-codigo:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.15);
}

/* ── Autocompletado ─────────────────────────────────────────────────── */
.ci-autocomplete-lista {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    z-index: 999;
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

.ci-autocomplete-lista li {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 15px;
    color: #333;
    transition: background 0.15s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.ci-autocomplete-lista li:hover {
    background: #f0f4f8;
}

.ci-ac-nombre {
    font-weight: 600;
    flex: 1;
}

.ci-ac-grupo {
    font-size: 12px;
    color: #777;
    background: #eee;
    border-radius: 4px;
    padding: 2px 7px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Botones ────────────────────────────────────────────────────────── */
.ci-btn {
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.ci-btn:active {
    transform: scale(0.97);
}

.ci-btn-buscar {
    background: #0073aa;
    color: #fff;
}

.ci-btn-buscar:hover {
    opacity: 0.88;
}

.ci-btn-validar {
    background: #4a9fd4;
    color: #fff;
    margin-top: 12px;
    margin-right: 8px;
    letter-spacing: 0.05em;
}

.ci-btn-validar:hover {
    opacity: 0.88;
}

.ci-btn-cancelar {
    background: #636e72;
    color: #fff;
    margin-top: 12px;
    letter-spacing: 0.05em;
}

.ci-btn-cancelar:hover {
    opacity: 0.88;
}

.ci-contador {
    display: inline-block;
    margin-top: 10px;
    margin-left: 6px;
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    font-style: italic;
    vertical-align: middle;
}

.ci-btn-confirmar {
    background: #888;
    color: #fff;
    width: 100%;
    margin-top: 8px;
    font-size: 16px;
    padding: 12px;
}

.ci-btn-confirmar:hover {
    background: #666;
}

/* ── Barra superior del nombre ──────────────────────────────────────── */
.ci-barra-nombre {
    background: #b0b0b0;
    color: #fff;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px 6px 0 0;
}

/* ── Tarjeta principal ──────────────────────────────────────────────── */
.ci-tarjeta {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    border-radius: 0 0 12px 12px;
    transition: background-color 0.3s;
}

.ci-tarjeta.ci-verde {
    background-color: #d4f5c4;
}

.ci-tarjeta.ci-rojo {
    background-color: #8b1a3a;
    color: #fff;
}

/* ── Foto ───────────────────────────────────────────────────────────── */
.ci-tarjeta-foto {
    flex-shrink: 0;
}

.ci-tarjeta-foto img {
    width: 130px;
    height: 160px;
    object-fit: cover;
    border-radius: 10px;
    border: 4px solid rgba(255,255,255,0.6);
    background: #e0e0e0;
}

/* ── Info del alumno ────────────────────────────────────────────────── */
.ci-tarjeta-info {
    flex: 1;
}

.ci-nombre-completo {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.2;
}

.ci-grupo-info {
    font-size: 15px;
    margin: 0 0 8px;
    opacity: 0.85;
}

.ci-estado-texto {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0 0 8px;
}

.ci-tarjeta.ci-verde .ci-estado-texto {
    color: #276221;
}

.ci-motivo-texto {
    font-size: 15px;
    margin: 0 0 10px;
    opacity: 0.9;
    font-style: italic;
}

/* ── No encontrado ──────────────────────────────────────────────────── */
.ci-no-encontrado {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 16px 20px;
    color: #856404;
    font-size: 16px;
    text-align: center;
}

/* ── Modal de confirmación ──────────────────────────────────────────── */
.ci-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ci-modal {
    background: #fff;
    border-radius: 10px;
    padding: 28px 32px;
    min-width: 220px;
    max-width: 320px;
    text-align: center;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.ci-modal-cerrar {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #e00;
    line-height: 1;
}

.ci-modal-texto {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 8px 0 16px;
    line-height: 1.5;
}

/* ── Error general ──────────────────────────────────────────────────── */
.ci-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 520px) {
    .ci-tarjeta {
        flex-direction: column;
        text-align: center;
    }

    .ci-nombre-completo {
        font-size: 22px;
    }

    .ci-tarjeta-foto img {
        width: 100px;
        height: 120px;
    }
}
