/* Payment Section */
.payment-section {
    border-top: 2px solid #e1e8ed;
    padding-top: 30px;
}

.selected-summary {
    background: #e8f5e8;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.selected-summary h4 {
    color: #27ae60;
    margin-bottom: 15px;
}

.selected-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    margin-bottom: 8px;
    gap: 20px;
    width: 100%;
}

.selected-item span:first-child {
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selected-item span:nth-child(2) {
    text-align: right;
    white-space: nowrap;
    font-weight: 600;
    color: #27ae60;
}

/* Responsive adjustments for selected items on mobile */
@media (max-width: 480px) {
    .selected-item {
        grid-template-columns: 1fr auto auto;
        gap: 10px;
    }
    
    .selected-item span:first-child {
        font-size: 0.9rem;
    }
    
    .selected-item span:nth-child(2) {
        font-size: 0.9rem;
    }
}

.total {
    border-top: 1px solid #27ae60;
    padding-top: 10px;
    margin-top: 10px;
    font-size: 18px;
}

/* Payment Result */
.payment-result {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.payment-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 30px;
    gap: 15px;
}

.payment-header h2 {
    margin: 0;
}

.back-button {
    padding: 8px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    align-self: flex-start;
}

.back-button:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateX(-3px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.back-button:active {
    transform: translateX(-1px);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

/* For larger screens, we can use a more sophisticated layout */
@media (min-width: 768px) {
    .payment-header {
        flex-direction: row;
        margin-bottom: 20px;
    }
    
    .back-button {
        position: absolute;
        left: 0;
        margin-right: auto;
    }
}

/* Payment Steps */
.payment-steps {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
}

/* Make payment steps responsive on mobile */
@media (max-width: 480px) {
    .payment-steps {
        gap: 10px;
        padding: 15px 10px;
    }
    
    .step-text {
        font-size: 0.8rem;
    }
    
    .step-number {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.step.active {
    opacity: 1;
}

.step.completed {
    opacity: 1;
    color: #27ae60;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.step.completed .step-number {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.step-text {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

/* QR Code Section */
.qr-section {
    margin-bottom: 20px;
}

.qr-section img {
    max-width: 100%;
    height: auto;
}

/* Make QR code display better on mobile */
@media (max-width: 480px) {
    .qr-section img {
        max-width: 80%;
    }
}

/* QR Code Reminder */
.qr-reminder {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #f39c12;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
}

/* Make reminder more compact on mobile */
@media (max-width: 480px) {
    .qr-reminder {
        padding: 12px;
        gap: 10px;
    }
    
    .reminder-text {
        font-size: 0.8rem;
    }
}

.reminder-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.reminder-text {
    font-size: 0.9rem;
    color: #856404;
    line-height: 1.4;
}

/* Confirmation Reminder */
.confirmation-reminder {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #e8f5e8 0%, #d5f4e6 100%);
    border: 2px solid #27ae60;
    border-radius: 20px;
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Make confirmation section more compact on mobile */
@media (max-width: 480px) {
    .confirmation-reminder {
        padding: 15px;
        margin-top: 20px;
    }
    
    .confirmation-reminder p {
        font-size: 0.95rem;
    }
    
    .confirm-btn {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
}

.reminder-pulse {
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
}

.pulse-icon {
    font-size: 1.5rem;
    animation: pulse 3s infinite;
}

.confirmation-reminder p {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 500;
}

.reminder-note {
    font-size: 0.85rem !important;
    color: #6c757d !important;
    margin-top: 10px !important;
    font-style: italic;
}

/* Ensure the confirm button is centered */
#confirmPaymentBtn {
    margin: 0 auto;
    display: block;
}

/* Pulsing button animation */
.pulsing {
    animation: buttonPulse 4s infinite;
    position: relative;
}

.pulsing::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 17px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    opacity: 0.2;
    animation: ringPulse 4s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes buttonPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.01); }
}

@keyframes ringPulse {
    0% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(1.02); opacity: 0.05; }
    100% { transform: scale(1); opacity: 0.2; }
}

/* Transfer Notification */
.transfer-notification {
    margin-top: 15px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
    border-radius: 15px;
    animation: slideIn 0.5s ease-out;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #155724;
    font-weight: 500;
}

.notification-icon {
    font-size: 1.2rem;
}

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

/* Mobile responsive for payment steps */
@media (max-width: 768px) {
    .payment-steps {
        gap: 15px;
        padding: 15px;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .step-text {
        font-size: 0.8rem;
    }
    
    .qr-reminder {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .pulse-icon {
        font-size: 1.5rem;
    }
}

.qr-section {
    margin-bottom: 32px;
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 16px 40px rgba(0, 0, 0, 0.08),
        0 4px 16px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    position: relative;
    overflow: hidden;
}

.qr-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
}

.qr-section img {
    max-width: 280px;
    border: 2px solid rgba(0, 122, 255, 0.3);
    border-radius: 20px;
    box-shadow: 
        0 16px 40px rgba(0, 122, 255, 0.15),
        0 4px 16px rgba(0, 122, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.payment-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: left;
}

.bank-details p {
    margin-bottom: 10px;
}

.bank-account-row {
    margin-bottom: 10px;
}

.bank-account-row .link-display {
    margin-top: 5px;
}

/* QR Code Instructions */
.qr-instructions {
    margin: 20px 0;
}

.instruction-highlight {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #2196f3;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    text-align: center;
}

.bank-app-icon {
    font-size: 2.5em;
    flex-shrink: 0;
}

.instruction-text h4 {
    margin: 0 0 8px 0;
    color: #1976d2;
    font-size: 1.2em;
}

.instruction-text p {
    margin: 0;
    color: #424242;
    line-height: 1.4;
}

.instruction-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.mini-step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9em;
    color: #495057;
}

.mini-step-number {
    background: #007bff;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: bold;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .instruction-highlight {
        flex-direction: column;
        gap: 10px;
    }
}

/* Bank Account Copy Button */
.bank-account-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background-color: #dee2e6;
    border-color: #adb5bd;
}

.copy-btn:active {
    background-color: #ced4da;
    transform: translateY(1px);
}

.copy-btn.copied {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.copy-icon {
    font-size: 1rem;
}

@media (max-width: 480px) {
    .bank-account-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .copy-btn {
        margin-top: 5px;
        padding: 8px 12px;
    }
}
