/* 💸 To SOFI Transfer - Modal Styles */
/* Preview flow UI similar to feed comments */

.transfer-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.transfer-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.transfer-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 600px;
    min-height: 50vh;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUpFromBottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    touch-action: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Instagram-style drag handle */
.transfer-modal-content::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    z-index: 10;
}

.transfer-modal-header {
    position: relative;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.transfer-modal-header:active {
    cursor: grabbing;
}

.transfer-modal-header.success {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    color: white;
    border: none;
    padding: 40px 20px;
    text-align: center;
    flex-direction: column;
}

.transfer-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    text-align: center;
}

.back-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
}

.back-btn:hover {
    background: #f5f5f5;
}

.step-indicator {
    font-size: 12px;
    color: #999;
    padding: 4px 12px;
    background: #f5f5f5;
    border-radius: 12px;
}

.transfer-modal-body {
    padding: 24px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

/* Input Groups */
.input-group {
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.input-hint {
    font-size: 12px;
    color: #999;
    margin-bottom: 12px;
}

.search-input-wrapper {
    display: flex;
    gap: 8px;
}

.search-input-wrapper input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s;
    background: #ffffff;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: #1877F2;
    box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.1);
}

.search-btn {
    padding: 14px 20px;
    background: #1877F2;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
    background: #166FE5;
}

/* Search Results */
.search-results {
    margin-top: 16px;
}

.loading, .no-results, .error {
    text-align: center;
    padding: 24px;
    color: #999;
}

.error {
    color: #ef4444;
}

/* Recipient Card */
.recipient-card {
    background: #ffffff;
    border: 2px solid #f0f0f0;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.recipient-avatar {
    position: relative;
}

.recipient-avatar img,
.avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 600;
}

.verified-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #00b894;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: 2px solid white;
}

.recipient-info h4 {
    margin: 0 0 4px 0;
    font-size: 18px;
    color: #333;
}

.recipient-info .username {
    color: #a855f7;
    font-size: 14px;
    margin: 0 0 4px 0;
}

.recipient-info .phone {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.confirmation-message {
    text-align: center;
    margin-bottom: 24px;
}

.confirmation-message p {
    font-size: 16px;
    color: #666;
}

/* Amount Input */
.balance-display {
    text-align: center;
    margin-bottom: 24px;
    padding: 16px;
    background: #ffffff;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
}

.balance-display small {
    font-size: 12px;
    color: #999;
}

.balance-display h3 {
    margin: 4px 0 0 0;
    font-size: 24px;
    color: #333;
}

.amount-input-group {
    margin-bottom: 24px;
}

.amount-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 16px;
    font-size: 20px;
    color: #666;
    font-weight: 600;
}

.amount-input-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 40px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 24px;
    font-weight: 600;
    transition: all 0.2s;
    background: #ffffff;
}

.amount-input-wrapper input:focus {
    outline: none;
    border-color: #1877F2;
    box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.1);
}

/* Quick Amounts */
.quick-amounts {
    margin-bottom: 24px;
}

.quick-amounts p {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.quick-amount-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.quick-amount-buttons button {
    padding: 12px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-amount-buttons button:hover {
    background: #1877F2;
    color: white;
    border-color: #1877F2;
}

/* Fee Info */
.fee-info {
    background: #e0f2fe;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.free-badge {
    background: #00b894;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.fee-info small {
    color: #0284c7;
    font-size: 12px;
}

/* Confirmation Summary */
.confirmation-summary {
    background: #ffffff;
    border: 2px solid #f0f0f0;
    border-radius: 16px;
    padding: 32px 24px;
    margin-bottom: 24px;
}

.summary-icon {
    text-align: center;
    font-size: 48px;
    margin-bottom: 16px;
}

.confirmation-summary h2 {
    text-align: center;
    font-size: 36px;
    margin: 0 0 24px 0;
    color: #333;
}

.summary-divider {
    height: 1px;
    background: #dee2e6;
    margin: 16px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.summary-row .label {
    color: #666;
    font-size: 14px;
}

.summary-row .value {
    text-align: right;
    font-weight: 600;
    color: #333;
}

.summary-row .value small {
    display: block;
    color: #a855f7;
    font-size: 12px;
    font-weight: 400;
}

.summary-row.total {
    font-size: 18px;
    margin-top: 8px;
}

.summary-row .free {
    color: #00b894;
}

.warning-message {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.warning-message p {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #856404;
}

.warning-message small {
    color: #856404;
    font-size: 12px;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 12px;
}

.btn-primary,
.btn-secondary,
.btn-biometric {
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    color: white;
    flex: 1;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e0e0e0;
    flex: 1;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-full {
    width: 100%;
}

.btn-pay {
    font-size: 18px;
    padding: 18px 24px;
}

/* PIN Prompt */
.auth-prompt {
    text-align: center;
}

.auth-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.auth-prompt h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
}

.auth-prompt p {
    color: #666;
    margin-bottom: 32px;
}

.pin-input-group {
    margin-bottom: 32px;
}

.pin-dots {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.pin-dot {
    width: 16px;
    height: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    transition: all 0.2s;
}

.pin-dot.filled {
    background: #a855f7;
    border-color: #a855f7;
}

/* Numpad */
.numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 280px;
    margin: 0 auto 24px;
}

.numpad-btn {
    aspect-ratio: 1;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    font-size: 24px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.numpad-btn:hover:not(:disabled) {
    background: #e9ecef;
    transform: scale(1.05);
}

.numpad-btn:active {
    transform: scale(0.95);
}

.numpad-btn:disabled {
    opacity: 0;
    cursor: default;
}

.or-divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

.or-divider::before,
.or-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e0e0e0;
}

.or-divider::before {
    left: 0;
}

.or-divider::after {
    right: 0;
}

.or-divider span {
    background: white;
    padding: 0 16px;
    color: #999;
    font-size: 12px;
}

.btn-biometric {
    width: 100%;
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    color: white;
    font-size: 16px;
}

.btn-biometric:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

/* Processing */
.processing {
    text-align: center;
    padding: 48px 24px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f3f4f6;
    border-top-color: #a855f7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.processing h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
}

.processing p {
    color: #666;
    margin: 0;
}

/* Receipt */
.receipt {
    background: white;
    border: 2px dashed #e0e0e0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.receipt-amount {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 24px;
}

.receipt-amount h2 {
    margin: 0 0 8px 0;
    font-size: 36px;
    color: #333;
}

.receipt-amount p {
    margin: 0;
    color: #666;
}

.receipt-details {
    font-size: 14px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f8f9fa;
}

.receipt-row:last-child {
    border-bottom: none;
}

.receipt-row.total {
    font-size: 18px;
    font-weight: 600;
    padding-top: 16px;
    border-top: 2px solid #e0e0e0;
}

.mono {
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 4px;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

/* Toast Messages */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    animation: slideUp 0.3s ease;
}

.toast-error {
    background: #ef4444;
    color: white;
}

.toast-success {
    background: #00b894;
    color: white;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUpFromBottom {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Recent Transfers */
.recent-transfers {
    margin-top: 24px;
}

.recent-transfers h4 {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    font-weight: 600;
}

.recent-transfer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #ffffff;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.recent-transfer-item:hover {
    border-color: #1877F2;
    transform: translateX(4px);
}

.recent-transfer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1877F2 0%, #166FE5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.recent-transfer-info {
    flex: 1;
    margin-left: 12px;
}

.recent-transfer-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 2px;
}

.recent-transfer-phone {
    font-size: 12px;
    color: #999;
}

.recent-transfer-arrow {
    color: #1877F2;
    font-size: 20px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .transfer-modal-content {
        width: 100%;
        max-width: 100%;
        border-radius: 24px 24px 0 0;
        max-height: 95vh;
    }
    
    .transfer-modal {
        align-items: flex-end;
    }
    
    .quick-amount-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}
