/**
 * Payment System CSS - Ghana Realty Connect
 * Styling for payment modals and components
 */

/* Payment Modal Styles */
.payment-modal {
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

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

.modal-container {
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 4px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 24px;
}

/* Payment Summary */
.payment-summary {
    margin-bottom: 24px;
}

.summary-card {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.summary-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.total-amount {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Payment Steps */
.payment-step {
    animation: slideIn 0.3s ease;
}

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

.step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.step-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

.btn-back {
    background: #f3f4f6;
    border: none;
    color: #6b7280;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-back:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Payment Methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.payment-method:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.payment-method.active {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.method-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: #f3f4f6;
    color: #6b7280;
}

.payment-method[data-method="mobile_money"] .method-icon {
    background: #dbeafe;
    color: #2563eb;
}

.payment-method[data-method="bank_card"] .method-icon {
    background: #d1fae5;
    color: #059669;
}

.payment-method[data-method="bank_transfer"] .method-icon {
    background: #e0e7ff;
    color: #7c3aed;
}

.method-info {
    flex: 1;
}

.method-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
}

.method-description {
    font-size: 0.875rem;
    color: #6b7280;
}

.method-check {
    color: #3b82f6;
    font-size: 1.25rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.payment-method.active .method-check {
    opacity: 1;
}

/* Network Selection */
.network-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.network-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.network-option:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.network-option.active {
    border-color: #3b82f6;
    background: #eff6ff;
}

.network-logo {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.network-logo.mtn {
    background: linear-gradient(135deg, #ffcc00, #ff9900);
}

.network-logo.vodafone {
    background: linear-gradient(135deg, #e60000, #cc0000);
}

.network-logo.airteltigo {
    background: linear-gradient(135deg, #0066cc, #004499);
}

.network-option span {
    flex: 1;
    font-weight: 500;
    color: #374151;
}

.network-option i {
    color: #3b82f6;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.network-option.active i {
    opacity: 1;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-help {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.w-full {
    width: 100%;
}

.mt-6 {
    margin-top: 24px;
}

/* Payment Info Cards */
.card-payment-info,
.bank-transfer-info {
    margin-bottom: 24px;
}

.security-info,
.info-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
}

.security-info i,
.info-card i {
    font-size: 1.5rem;
}

/* Processing Animation */
.processing-animation {
    padding: 40px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e5e7eb;
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.processing-animation h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.processing-animation p {
    color: #6b7280;
    font-size: 0.95rem;
}

/* Security Notice */
.security-notice {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.security-content {
    display: flex;
    align-items: start;
    gap: 12px;
    padding: 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
}

.security-content i {
    color: #10b981;
    font-size: 1.25rem;
    margin-top: 2px;
}

.font-semibold {
    font-weight: 600;
    color: #065f46;
    margin-bottom: 4px;
}

.text-sm {
    font-size: 0.875rem;
    color: #047857;
    line-height: 1.4;
}

/* Payment Button Styles (for integration) */
.payment-button {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.payment-button:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.payment-button i {
    font-size: 1rem;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    animation: slideInRight 0.3s ease;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification-success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.notification-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.notification-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.notification-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.payment-success {
    text-align: center;
    padding: 20px;
}

.payment-success i {
    font-size: 3rem;
    margin-bottom: 16px;
}

.payment-success h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #065f46;
}

.payment-success p {
    color: #047857;
    margin-bottom: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .payment-modal {
        width: 95%;
        max-height: 95vh;
        margin: 20px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .payment-methods {
        gap: 8px;
    }
    
    .payment-method {
        padding: 12px;
        gap: 12px;
    }
    
    .method-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .method-title {
        font-size: 0.95rem;
    }
    
    .method-description {
        font-size: 0.8rem;
    }
    
    .btn-lg {
        padding: 14px 24px;
        font-size: 1rem;
    }
    
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .modal-header {
        padding: 16px;
    }
    
    .modal-title {
        font-size: 1.1rem;
    }
    
    .summary-card {
        padding: 16px;
    }
    
    .total-amount {
        font-size: 1.25rem;
    }
    
    .processing-animation {
        padding: 30px 15px;
    }
    
    .spinner {
        width: 50px;
        height: 50px;
    }
}

/* Property Payment Integration Styles */
.property-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.property-actions .btn {
    flex: 1;
    min-width: 140px;
}

.confirmation-content {
    text-align: center;
}

.property-summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.property-summary h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.property-location {
    color: #6b7280;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.price-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.price-label {
    font-weight: 500;
    color: #374151;
}

.price-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #059669;
}

.purchase-info,
.escrow-info {
    text-align: left;
}

.purchase-info p {
    display: flex;
    align-items: start;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.escrow-summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
}

.escrow-amounts {
    margin-top: 16px;
}

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

.amount-row.highlight {
    font-weight: 600;
    color: #059669;
    border-bottom: 2px solid #10b981;
}

.escrow-benefits,
.escrow-process {
    margin-bottom: 24px;
}

.escrow-benefits h5,
.escrow-process h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.benefits-list {
    list-style: none;
    padding: 0;
}

.benefits-list li {
    display: flex;
    align-items: start;
    gap: 8px;
    padding: 8px 0;
    font-size: 0.95rem;
    color: #374151;
}

.benefits-list li i {
    color: #10b981;
    margin-top: 2px;
    flex-shrink: 0;
}

.process-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.step-number {
    width: 32px;
    height: 32px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-text {
    font-size: 0.95rem;
    color: #374151;
}

.success-content {
    padding: 20px;
}

.success-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.success-content p {
    color: #6b7280;
    margin-bottom: 8px;
}

.next-steps {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
}

.next-steps h5 {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.next-steps ul {
    color: #6b7280;
    font-size: 0.95rem;
}

.next-steps li {
    margin-bottom: 4px;
}

.escrow-status {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
}

/* Responsive adjustments for property actions */
@media (max-width: 768px) {
    .property-actions {
        flex-direction: column;
    }
    
    .property-actions .btn {
        width: 100%;
        min-width: auto;
    }
    
    .price-display {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .process-steps {
        gap: 8px;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .step-number {
        margin: 0 auto;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }

.text-green-600 { color: #059669; }
.text-blue-600 { color: #2563eb; }
.text-red-600 { color: #dc2626; }