/* Payment Method Modal Styles */
.payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease-out;
    padding: 20px;
}

.payment-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    transform: translateY(30px);
    animation: modalSlideUp 0.4s ease-out forwards;
    position: relative;
    overflow: hidden;
    border: none;
}

.payment-modal-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(0, 123, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(40, 167, 69, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.payment-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
}

.payment-modal-header {
    padding: 25px 30px 15px 30px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.payment-modal-header h2 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.payment-modal-header .subtitle {
    color: #6c757d;
    font-size: 1rem;
    font-weight: 500;
}

.payment-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #6c757d;
    transition: all 0.3s ease;
    z-index: 10;
}

.payment-modal-close:hover {
    background: #e9ecef;
    color: #495057;
    transform: rotate(90deg);
}

.payment-modal-back {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #6c757d;
    transition: all 0.3s ease;
    z-index: 10;
}

.payment-modal-back:hover {
    background: #e9ecef;
    color: #495057;
    transform: translateX(-3px);
}

.payment-modal-body {
    padding: 25px;
}

.order-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #dee2e6;
    position: relative;
    overflow: hidden;
}

.order-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #28a745);
}

.order-summary h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-summary h3::before {
    content: '📋';
    font-size: 1.2rem;
}

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

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.summary-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 600;
}

.summary-value.amount {
    color: #28a745;
    font-size: 1.3rem;
}

.payment-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.payment-option {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 18px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.payment-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(0, 123, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.payment-option:hover::before {
    opacity: 1;
}

.payment-option:hover {
    transform: translateY(-8px);
    border-color: #007bff;
    box-shadow: 0 15px 40px rgba(0, 123, 255, 0.15);
}

.payment-option.cash:hover {
    border-color: #28a745;
    box-shadow: 0 15px 40px rgba(40, 167, 69, 0.15);
}

.payment-option.cash:hover::before {
    background: linear-gradient(135deg, transparent 0%, rgba(40, 167, 69, 0.05) 100%);
}

.payment-option-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.payment-option:hover .payment-option-icon {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.payment-option.featured .payment-option-icon {
    filter: drop-shadow(0 2px 8px rgba(0, 123, 255, 0.3));
}

.payment-option.cash .payment-option-icon {
    filter: drop-shadow(0 2px 8px rgba(40, 167, 69, 0.3));
}

.payment-option h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 600;
}

.payment-option-description {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.payment-option-subtitle {
    color: #868e96;
    font-size: 0.85rem;
    font-style: italic;
}

.payment-option.featured {
    border-color: #007bff;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    position: relative;
}

.payment-option.featured::after {
    content: '⭐ Popular';
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.payment-modal-footer {
    padding: 25px 30px 30px 30px;
    text-align: center;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.cancel-button {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 120px;
}

.cancel-button:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .payment-modal {
        padding: 15px;
    }
    
    .payment-modal-content {
        max-width: 100%;
        margin: 0;
        border-radius: 15px;
    }
    
    .payment-modal-header {
        padding: 25px 20px 15px 20px;
    }
    
    .payment-modal-header h2 {
        font-size: 1.6rem;
    }
    
    .payment-modal-body {
        padding: 20px;
    }
    
    .payment-options {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .payment-option {
        padding: 25px 20px;
        min-height: 180px;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .payment-modal-footer {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .payment-modal-header h2 {
        font-size: 1.4rem;
    }
    
    .payment-option h3 {
        font-size: 1.2rem;
    }
    
    .payment-option-icon {
        font-size: 3rem;
    }
}

/* Animation Keyframes */
@keyframes modalFadeIn {
    from { 
        opacity: 0; 
    }
    to { 
        opacity: 1; 
    }
}

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

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

/* Loading States */
.payment-option.loading {
    pointer-events: none;
    opacity: 0.7;
}

.payment-option.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus States for Accessibility */
.payment-option:focus {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

.payment-modal-close:focus {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

.payment-modal-back:focus {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

.cancel-button:focus {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}
