/* ========================================
   TRANSFERS — Send Money UI styles
   Fintechs client view
   ======================================== */

/* ── 1. FORM CARD ── */
.tr-form-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}

/* ── 2. AMOUNT INPUT WITH CURRENCY PREFIX ── */
.tr-amount-wrap {
    display: flex;
    align-items: center;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.tr-amount-wrap:focus-within {
    border-color: #0891b2;
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}

.tr-currency {
    padding: 8px 12px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    border-right: 1px solid #ced4da;
    flex-shrink: 0;
}

.tr-amount-input {
    flex: 1 1 auto;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 8px 12px;
}

.tr-amount-input:focus {
    outline: none;
    box-shadow: none !important;
}

/* ── 3. SUBMIT BUTTON ── */
.tr-submit-btn {
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 12px;
    border-radius: 10px;
}

.tr-send-accordion {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.tr-send-toggle {
    width: 100%;
    border: none;
    background: #f8fafc;
    color: #0f172a;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
}

.tr-send-toggle:hover {
    background: #f1f5f9;
}

.tr-send-toggle-title {
    white-space: nowrap;
}

.tr-send-toggle-meta {
    color: #64748b;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
}

.tr-send-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 1110;
    padding: 0;
    display: none;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.tr-send-modal-overlay.open {
    display: flex;
    opacity: 1;
}

.tr-send-modal-overlay.mode-sheet {
    align-items: flex-end;
    padding: 0;
}

.tr-send-modal-overlay.mode-modal {
    align-items: center;
    padding: 14px;
}

.tr-send-modal-card {
    width: 100%;
    max-height: 82vh;
    max-width: 560px;
    background: #ffffff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.24);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

.tr-send-modal-overlay.open .tr-send-modal-card {
    transform: translateY(0);
}

.tr-send-modal-overlay.mode-modal .tr-send-modal-card {
    max-height: 75vh;
    border-radius: 16px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.28);
    opacity: 0;
    transform: scale(0.96);
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.tr-send-modal-overlay.mode-modal.open .tr-send-modal-card {
    opacity: 1;
    transform: scale(1);
}

.tr-send-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.tr-send-modal-body {
    padding: 14px;
    overflow-y: auto;
}

/* ── 4. QUICK BENEFICIARY LIST ── */
.tr-quick-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tr-quick-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    user-select: none;
}

.tr-quick-item:hover {
    background: #f0f9ff;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.10);
}

.tr-quick-item:active {
    background: #e0f2fe;
}

.tr-quick-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}

.tr-quick-info {
    min-width: 0;
    flex: 1;
}

.tr-quick-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tr-quick-ref {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0;
}

.tr-quick-send-icon {
    color: #0891b2;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* ── 5. PREVIEW / CONFIRM OVERLAY ── */
body.tr-overlay-open {
    overflow: hidden;
}

.tr-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.52);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    z-index: 1300;
    overflow-y: hidden;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.tr-overlay.open {
    opacity: 1;
}

.tr-overlay.mode-sheet {
    align-items: flex-end;
}

.tr-overlay.mode-modal {
    align-items: center;
    padding: 14px;
}

.tr-overlay-card {
    width: 100%;
    max-height: 80vh;
    background: #ffffff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.24);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

.tr-overlay.open .tr-overlay-card {
    transform: translateY(0);
}

.tr-overlay.mode-modal .tr-overlay-card {
    max-width: 560px;
    max-height: 75vh;
    border-radius: 16px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.28);
    opacity: 0;
    transform: scale(0.96);
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.tr-overlay.mode-modal.open .tr-overlay-card {
    opacity: 1;
    transform: scale(1);
}

.tr-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.tr-overlay-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
}

/* ── 6. PREVIEW DETAILS CARD ── */
.tr-preview-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.tr-preview-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.tr-preview-row:last-child {
    border-bottom: none;
}

.tr-preview-label {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
    flex-shrink: 0;
    padding-top: 2px;
}

.tr-preview-value {
    font-size: 0.9rem;
    color: #111827;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
    line-height: 1.4;
}

.tr-preview-amount {
    font-size: 1.15rem;
    color: #0891b2;
    font-weight: 700;
}

/* ── 7. PIN INPUT SECTION ── */
.tr-pin-section {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.tr-pin-section .form-label {
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.tr-pin-input {
    letter-spacing: 0.5em;
    font-size: 1.25rem;
    text-align: center;
    border-color: #d1d5db;
}

.tr-pin-input:focus {
    border-color: #0891b2;
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}

.tr-pin-input.is-invalid {
    border-color: #ef4444;
}

.tr-pin-error {
    font-size: 0.8rem;
    color: #ef4444;
    min-height: 1.2em;
    margin-top: 6px;
    margin-bottom: 0;
}

/* ── 8. SUCCESS OVERLAY ── */
.tr-success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1100;
}

.tr-success-card {
    width: 100%;
    max-width: 340px;
    background: #ffffff;
    border-radius: 20px;
    padding: 36px 24px;
    text-align: center;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.20);
}

.tr-success-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #d1fae5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.85rem;
    color: #059669;
}

.tr-success-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.tr-success-message {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.5;
}

.tr-success-done-btn {
    font-weight: 600;
    border-radius: 10px;
    padding: 10px 40px;
}

/* —— 9. RECENT TRANSFERS ACCORDION + HISTORY ROWS —— */
.tr-history-accordion {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.tr-history-toggle {
    width: 100%;
    border: none;
    background: #f8fafc;
    color: #0f172a;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
}

.tr-history-toggle:hover {
    background: #f1f5f9;
}

.tr-history-toggle-title {
    white-space: nowrap;
}

.tr-history-toggle-meta {
    color: #64748b;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
}

.tr-history-chevron {
    transition: transform 0.2s ease;
}

.tr-history-toggle[aria-expanded="true"] .tr-history-chevron {
    transform: rotate(180deg);
}

.tr-history-panel {
    border-top: 1px solid #e5e7eb;
}

.tr-history-list {
    display: flex;
    flex-direction: column;
}

.tr-history-empty {
    padding: 16px;
    text-align: center;
    color: #6b7280;
    font-size: 0.87rem;
}

.tr-history-row {
    border: none;
    background: #ffffff;
    width: 100%;
    padding: 13px 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
}

.tr-history-row:last-child {
    border-bottom: none;
}

.tr-history-row:hover {
    background: #f8fafc;
}

.tr-history-left {
    min-width: 0;
    flex: 1 1 auto;
}

.tr-history-name {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
}

.tr-history-ref {
    margin: 2px 0 0;
    font-size: 0.78rem;
    color: #64748b;
}

.tr-history-right {
    text-align: right;
    flex-shrink: 0;
}

.tr-history-amount {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0891b2;
    line-height: 1.2;
}

.tr-history-date {
    margin: 2px 0 0;
    font-size: 0.75rem;
    color: #94a3b8;
}

.tr-history-status {
    margin-top: 6px;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.tr-history-status.success {
    background: #dcfce7;
    color: #166534;
}

.tr-history-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.tr-history-status.failed {
    background: #fee2e2;
    color: #991b1b;
}

.tr-history-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 12px;
    z-index: 1120;
}

.tr-history-detail-card {
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.2);
}

.tr-history-detail-header {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tr-history-detail-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.tr-history-detail-body {
    padding: 12px 16px 14px;
}

.tr-history-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.tr-history-detail-row:last-child {
    border-bottom: none;
}

.tr-history-detail-label {
    font-size: 0.8rem;
    color: #6b7280;
}

.tr-history-detail-value {
    font-size: 0.88rem;
    font-weight: 600;
    color: #111827;
    text-align: right;
}
