/**
 * 支付收银台样式
 * 
 * @package UserAuthPro
 * @subpackage Assets
 */

/* ========== 全局样式 ========== */
.uap-checkout-page {
    background: #f9fafb;
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

.uap-checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.uap-checkout-wrapper {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
    align-items: start;
}

/* ========== 左侧：订单信息 ========== */
.uap-checkout-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.uap-checkout-header {
    margin-bottom: 8px;
}

.uap-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 16px;
    transition: color 0.2s ease;
}

.uap-back-link:hover {
    color: #1f2937;
}

.uap-back-link svg {
    width: 20px;
    height: 20px;
}

.uap-checkout-title {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

/* 订单信息卡片 */
.uap-order-info-card,
.uap-payment-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.uap-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 24px 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

/* 订单详情 */
.uap-order-detail {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.uap-order-item-info {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.uap-order-item-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
}

.uap-order-item-details {
    flex: 1;
}

.uap-order-item-name {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 6px 0;
}

.uap-order-item-type {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* 订单元信息 */
.uap-order-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
}

.uap-order-meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.uap-meta-label {
    font-size: 14px;
    color: #6b7280;
}

.uap-meta-value {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
}

/* 价格明细 */
.uap-order-price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.uap-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.uap-price-label {
    font-size: 14px;
    color: #6b7280;
}

.uap-price-value {
    font-size: 16px;
    font-weight: 500;
    color: #1f2937;
}

.uap-discount-row .uap-price-value {
    color: #10b981;
}

.uap-total-row {
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    margin-top: 4px;
}

.uap-total-row .uap-price-label {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.uap-total-price {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #6366f1 !important;
}

/* 订单超时提示 */
.uap-order-timeout {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 12px;
    color: #92400e;
    font-size: 14px;
}

.uap-order-timeout svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ========== 右侧：支付方式 ========== */
.uap-checkout-right {
    position: sticky;
    top: 0;
}

/* 支付方式列表 */
.uap-payment-methods-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    min-height: 200px;
}

.uap-payment-method-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
}

.uap-payment-method-item:hover {
    border-color: #6366f1;
    background: #f9fafb;
}

.uap-payment-method-item.selected {
    border-color: #6366f1;
    background: #eef2ff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.uap-payment-method-logo {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 10px;
    flex-shrink: 0;
}

.uap-payment-method-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.uap-payment-method-content {
    flex: 1;
}

.uap-payment-method-name {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px 0;
}

.uap-payment-method-desc {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

.uap-payment-method-check {
    width: 24px;
    height: 24px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.uap-payment-method-item.selected .uap-payment-method-check {
    border-color: #6366f1;
    background: #6366f1;
}

.uap-payment-method-item.selected .uap-payment-method-check::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
}

/* 提交按钮 */
.uap-submit-payment {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.uap-submit-payment:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.uap-submit-payment:active:not(:disabled) {
    transform: translateY(0);
}

.uap-submit-payment:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
}

/* 安全提示 */
.uap-payment-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 13px;
}

.uap-payment-security svg {
    width: 16px;
    height: 16px;
    color: #10b981;
}

/* ========== 加载状态 ========== */
.uap-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 16px;
}

.uap-loading p {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

.uap-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.uap-spinner-large {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== 支付处理模态框 ========== */
.uap-processing-modal {
    text-align: center;
    padding: 48px 32px;
    max-width: 400px;
}

.uap-processing-icon {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.uap-processing-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px 0;
}

.uap-processing-desc {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* ========== 响应式设计 ========== */
@media (max-width: 968px) {
    .uap-checkout-wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .uap-checkout-right {
        position: static;
    }

    .uap-checkout-title {
        font-size: 24px;
    }

    .uap-order-info-card,
    .uap-payment-card {
        padding: 24px;
    }

    .uap-total-price {
        font-size: 24px !important;
    }
}

@media (max-width: 640px) {
    .uap-checkout-container {
        padding: 0;
    }

    .uap-order-item-icon {
        width: 48px;
        height: 48px;
    }

    .uap-order-item-name {
        font-size: 16px;
    }

    .uap-order-meta {
        padding: 12px;
    }

    .uap-payment-method-item {
        padding: 16px;
    }

    .uap-payment-method-logo {
        width: 40px;
        height: 40px;
    }
}

/* ========== 空状态 ========== */
.uap-no-payment-methods {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.uap-no-payment-methods svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    color: #d1d5db;
}

.uap-no-payment-methods p {
    margin: 0;
    font-size: 14px;
}
