/* ══════════════════════════════════════════════════════════════════════
 * modal-base.css — Estilos compartidos para todos los modales BH
 * ──────────────────────────────────────────────────────────────────────
 * Centraliza overlay, card, header, body, footer, labels, inputs y
 * botones que antes estaban duplicados en ActivityModal, CreateBhModal
 * y DeleteConfirmModal (~240 líneas x3).
 * ══════════════════════════════════════════════════════════════════════ */

/* ── Overlay ──────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-overlay--open {
    opacity: 1;
    pointer-events: auto;
}

/* ── Card ─────────────────────────────────────────────────────────── */
.modal-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;    max-height: calc(100vh - 2rem);   /* nunca excede el viewport */
    display: flex;
    flex-direction: column;    overflow: hidden;
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.modal-card--open {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-card--md {
    max-width: 560px;
}

.modal-card--sm {
    max-width: 480px;
}

/* ── Header ───────────────────────────────────────────────────────── */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.modal-header--dark {
    background-color: #37474F;
}

.modal-header--green {
    background-color: #2E7D32;
}

.modal-header-title {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.60);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.25rem;
    transition: color 0.15s ease;
}

.modal-close:hover {
    color: #fff;
}

/* ── Body ─────────────────────────────────────────────────────────── */
.modal-body {
    padding: 1.25rem 1.5rem;
    flex: 1 1 auto;              /* ocupa el espacio sobrante */
    overflow-y: auto;            /* scroll solo en el body */
    min-height: 0;               /* necesario para que flex + overflow funcione */
}

/* ── Field ────────────────────────────────────────────────────────── */
.modal-field {
    margin-bottom: 1rem;
}

/* ── Label ────────────────────────────────────────────────────────── */
.modal-label {
    display: block;
    color: rgba(55, 71, 79, 0.60);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
}

/* ── Input ────────────────────────────────────────────────────────── */
.modal-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #ECE6D8;
    color: #37474F;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.modal-input:focus {
    border-color: #2E7D32;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.20);
}

/* ── Header / Footer: no se encogen ─────────────────────────────────────── */
.modal-header {
    flex-shrink: 0;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #ECE6D8;
    flex-shrink: 0;
}

/* ── Buttons ──────────────────────────────────────────────────────── */
.modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.15s ease;
}

.modal-btn--cancel {
    background: transparent;
    border: 1px solid #ECE6D8;
    color: rgba(55, 71, 79, 0.60);
}

.modal-btn--cancel:hover {
    background-color: #F8F5F0;
}

.modal-btn--green {
    background-color: #2E7D32;
    color: #fff;
    font-weight: 700;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.modal-btn--green:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.10);
}

.modal-btn--red {
    background-color: #C62828;
    color: #fff;
    font-weight: 700;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.modal-btn--red:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.10);
}

.modal-btn--disabled {
    opacity: 0.4;
    cursor: default;
}

.modal-btn--disabled:hover {
    box-shadow: none;
}
