/**
 * Payment Gateway Styles
 * Styles for payment gateway selection and mock payment dialog
 */

/* Payment Gateway Selection */
.payment-gateway-selector {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.gateway-selector-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.gateway-selector-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.25rem;
    font-weight: 600;
}

.mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    background: #667eea;
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mode-badge.sandbox {
    background: #f6ad55;
}

.mode-badge.live {
    background: #48bb78;
}

.gateway-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.gateway-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.gateway-option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.2);
}

.gateway-option.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.gateway-option.active .gateway-name,
.gateway-option.active .gateway-description {
    color: white;
}

.gateway-logo {
    width: 80px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 2rem;
    color: #667eea;
}

.gateway-option.active .gateway-logo {
    color: white;
}

.gateway-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.gateway-description {
    font-size: 0.875rem;
    color: #718096;
    text-align: center;
}

.gateway-check {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    background: #48bb78;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
}

.gateway-option.active .gateway-check {
    display: flex;
}

/* Mock Payment Dialog */
.mock-payment-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: 10000;
    animation: fadeIn 0.3s ease;
}

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

.mock-payment-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

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

.mock-payment-header {
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    text-align: center;
}

.mock-payment-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    font-weight: 700;
}

.mock-payment-header p {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mock-payment-body {
    padding: 2rem;
}

.payment-info {
    background: #f7fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.payment-info h4 {
    margin: 0 0 1rem 0;
    color: #2d3748;
    font-size: 1.125rem;
    font-weight: 600;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.info-row span {
    color: #718096;
    font-size: 0.875rem;
}

.info-row strong {
    color: #2d3748;
    font-weight: 600;
}

.mock-card-form h4 {
    margin: 0 0 1rem 0;
    color: #2d3748;
    font-size: 1.125rem;
    font-weight: 600;
}

.test-cards {
    display: grid;
    gap: 1rem;
}

.test-card-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.test-card-option:hover {
    border-color: #667eea;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.test-card-option i {
    font-size: 2rem;
}

.test-card-option[data-result="success"] i {
    color: #48bb78;
}

.test-card-option[data-result="failed"] i {
    color: #f56565;
}

.test-card-option[data-result="pending"] i {
    color: #ed8936;
}

.test-card-option strong {
    display: block;
    color: #2d3748;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.test-card-option p {
    margin: 0;
    color: #718096;
    font-size: 0.875rem;
    font-family: monospace;
}

.mock-payment-footer {
    padding: 1.5rem 2rem;
    background: #f7fafc;
    border-radius: 0 0 16px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.btn-mock-cancel {
    padding: 0.75rem 1.5rem;
    background: #e2e8f0;
    color: #2d3748;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-mock-cancel:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

.processing-payment {
    text-align: center;
    padding: 3rem 2rem;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    margin: 0 auto 1.5rem auto;
    animation: spin 1s linear infinite;
}

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

.processing-payment h4 {
    margin: 0 0 0.5rem 0;
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 600;
}

.processing-payment p {
    margin: 0;
    color: #718096;
    font-size: 1rem;
}

/* Payment Success/Failure Messages */
.payment-result-message {
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideIn 0.3s ease;
}

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

.payment-result-message.success {
    background: #c6f6d5;
    border: 2px solid #48bb78;
    color: #22543d;
}

.payment-result-message.error {
    background: #fed7d7;
    border: 2px solid #f56565;
    color: #742a2a;
}

.payment-result-message i {
    font-size: 1.5rem;
}

.payment-result-message.success i {
    color: #48bb78;
}

.payment-result-message.error i {
    color: #f56565;
}

.payment-result-content {
    flex: 1;
}

.payment-result-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.payment-result-content p {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Transaction Details */
.transaction-details {
    background: #f7fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.transaction-details h4 {
    margin: 0 0 1rem 0;
    color: #2d3748;
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.transaction-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.transaction-detail-row .label {
    color: #718096;
    font-size: 0.875rem;
}

.transaction-detail-row .value {
    color: #2d3748;
    font-weight: 600;
    font-family: monospace;
    font-size: 0.875rem;
}

/* Mode Toggle */
.payment-mode-toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.payment-mode-toggle label {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.875rem;
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    background: #cbd5e0;
    border-radius: 15px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-switch.active {
    background: #667eea;
}

.toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-switch.active .toggle-slider {
    transform: translateX(30px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .gateway-options {
        grid-template-columns: 1fr;
    }

    .mock-payment-modal {
        width: 95%;
        margin: 1rem;
    }

    .mock-payment-header,
    .mock-payment-body,
    .mock-payment-footer {
        padding: 1.5rem;
    }

    .payment-gateway-selector {
        padding: 1rem;
    }
}

/* Loading States */
.payment-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.payment-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
