/* Modal de comprobante / ticket (cobro, historial) */
.hif-ticket-modal {
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
}

.hif-ticket-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: #0f3d5e;
    color: #fff;
}

.hif-ticket-modal__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1rem;
    min-width: 0;
}

.hif-ticket-modal__title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hif-ticket-modal__close {
    flex-shrink: 0;
    border-color: rgba(255, 255, 255, 0.45) !important;
    color: #fff !important;
    font-weight: 500;
}

.hif-ticket-modal__close:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
}

.hif-ticket-modal__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 16px;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

.hif-ticket-modal__hint {
    margin: 0;
    font-size: 0.8125rem;
    color: #64748b;
    flex: 1 1 200px;
    min-width: 0;
}

.hif-ticket-modal__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.hif-ticket-modal__body {
    position: relative;
    background: #e2e8f0;
    min-height: 420px;
}

.hif-ticket-modal__iframe {
    display: block;
    width: 100%;
    height: min(72vh, 640px);
    min-height: 420px;
    border: 0;
    background: #fff;
}

.hif-ticket-modal__loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    z-index: 2;
}

.hif-ticket-modal__loading.d-none {
    display: none !important;
}

@media (max-width: 767.98px) {
    .hif-ticket-modal__iframe {
        height: 65vh;
        min-height: 360px;
    }

    .hif-ticket-modal__toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .hif-ticket-modal__actions {
        justify-content: stretch;
    }

    .hif-ticket-modal__actions .btn {
        flex: 1 1 auto;
    }
}
