/**
 * SagaPay Payment Styles
 *
 * @category    SagaPay
 * @package     SagaPay_Payment
 */

/* Payment Container */
.saga-payment-container {
    padding: 15px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Loading State */
.saga-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 8px;
}

.saga-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: saga-spin 0.8s linear infinite;
}

@keyframes saga-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Payment Method Tabs */
.saga-method-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.saga-method-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    height: 52px;
    padding: 10px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.saga-method-tab:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.saga-method-tab.active {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.saga-method-logo {
    max-height: 32px;
    max-width: 80px;
    object-fit: contain;
}

/* Payment Method Content */
.saga-method-content {
    min-height: 80px;
    padding: 4px 0;
}

.saga-method-info {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.saga-method-icon {
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex-shrink: 0;
}

.saga-method-info p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

/* Card Widget Container */
.saga-card-widget {
    min-height: 200px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.saga-widget-compact .saga-card-widget {
    min-height: 150px;
    padding: 12px;
}

.saga-widget-large .saga-card-widget {
    min-height: 280px;
    padding: 20px;
}

/* Apple Pay / Google Pay Widgets */
.saga-applepay-widget,
.saga-googlepay-widget {
    min-height: 52px;
    margin-bottom: 16px;
}

/* Place Order Button */
.saga-place-order {
    position: relative;
    min-width: 180px;
}

.saga-place-order:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.saga-btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: saga-spin 0.8s linear infinite;
    vertical-align: middle;
}

/* Error Messages */
.saga-payment-container .message-error {
    margin: 16px 0 0;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 14px;
}

/* Processing Overlay */
.saga-processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.saga-processing-overlay .saga-spinner {
    width: 48px;
    height: 48px;
    border-width: 4px;
    margin-bottom: 20px;
}

.saga-processing-overlay h3 {
    margin: 0 0 8px;
    color: #1f2937;
    font-size: 20px;
    font-weight: 600;
}

.saga-processing-overlay p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

/* Logo in payment title */
.payment-method-title .saga-logo {
    height: 24px;
    margin-left: 12px;
    vertical-align: middle;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .saga-method-tabs {
        flex-direction: column;
    }

    .saga-method-tab {
        width: 100%;
        justify-content: flex-start;
        padding-left: 24px;
    }

    .saga-method-info {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .saga-method-icon {
        width: 64px;
        height: 64px;
    }
}

/* Vipps Specific Styling */
.saga-vipps .saga-method-info {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-color: #fed7aa;
}

/* Klarna Specific Styling */
.saga-klarna .saga-method-info {
    background: linear-gradient(135deg, #fdf4ff 0%, #fae8ff 100%);
    border-color: #f5d0fe;
}

/* Swish Specific Styling */
.saga-swish .saga-method-info {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #bbf7d0;
}

/* MobilePay Specific Styling */
.saga-mobilepay .saga-method-info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #bfdbfe;
}
