/**
 * 赞赏页面样式 - 符合父主题设计语言
 */

/* 容器样式 - 使用父主题的entry-content和alignwide */
.zanshang-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 2rem 0;
}

/* 标题区域 */
.zanshang-header {
    text-align: center;
    margin-bottom: 3rem;
}

.zanshang-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.zanshang-subtitle {
    font-size: 1rem;
    opacity: 0.7;
    margin: 0;
}

/* 表单样式 */
.zanshang-form {
    max-width: 600px;
    margin: 0 auto;
}

/* 金额输入区域 */
.zanshang-amount-section {
    margin-bottom: 2rem;
}

.zanshang-amount-section label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.zanshang-preset-amounts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.zanshang-preset-amount-btn {
    padding: 0.75rem 1rem;
    border: 1px solid;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    font-family: inherit;
}

.zanshang-preset-amount-btn:hover {
    opacity: 0.8;
}

.zanshang-preset-amount-btn.active {
    background-color: var(--txt-color-100, #333333);
    color: var(--background-color-100, #f4f4f4);
    border-color: var(--txt-color-100, #333333);
}

.zanshang-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.zanshang-currency-symbol {
    position: absolute;
    left: 1rem;
    font-size: 1.2rem;
    font-weight: 500;
    opacity: 0.6;
    z-index: 1;
    pointer-events: none;
}

#amount {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.5rem;
    font-size: 1.25rem;
    font-weight: 500;
    border: 1px solid;
    border-radius: 4px;
    transition: all 0.3s ease;
    background-color: transparent;
    font-family: inherit;
}

#amount:focus {
    outline: none;
    border-color: var(--accent-color, #0088FF);
    box-shadow: 0 0 0 3px var(--txt-color-10, rgba(51, 51, 51, 0.1));
}

#amount::placeholder {
    opacity: 0.5;
    font-weight: 400;
}

/* 支付方式选择 */
.zanshang-payment-methods {
    margin-bottom: 2rem;
}

.zanshang-payment-title {
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 0.95rem;
}

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

.zanshang-payment-option {
    cursor: pointer;
}

.zanshang-payment-option input[type="radio"] {
    display: none;
}

.zanshang-option-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid;
    border-radius: 4px;
    transition: all 0.3s ease;
    background-color: transparent;
}

.zanshang-payment-option input[type="radio"]:checked + .zanshang-option-inner {
    background-color: var(--txt-color-100, #333333);
    border-color: var(--txt-color-100, #333333);
}

.zanshang-payment-option input[type="radio"]:checked + .zanshang-option-inner .zanshang-option-text {
    color: var(--background-color-100, #f4f4f4);
}

.zanshang-option-icon {
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.alipay-icon {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE4LjQgNi40djIuMkgxNlY2LjRoMi40TTggMTUuMmMtMS4yIDAtMi4yLS45LTIuMi0yLjIgMC0xLjIuOS0yLjIgMi4yLTIuMiAxLjIgMCAyLjIuOSAyLjIgMi4yIDAgMS4yLTEgMi4yLTIuMiAyLjJ6bTExLjItMi4yYzAtMS4yLS45LTIuMi0yLjItMi4yLTEuMiAwLTIuMi45LTIuMiAyLjIgMCAxLjIuOSAyLjIgMi4yIDIuMiAxLjIgMCAyLjItLjkgMi4yLTIuMnptMS42IDIuMmgtMi40di0yLjJoMi40djIuMnoiIGZpbGw9IiMwMEE2RUQiLz48L3N2Zz4=');
}

.usdt-icon {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEyIDJDNi41IDIgMiA2LjUgMiAxMnM0LjUgMTAgMTAgMTAgMTAtNC41IDEwLTEwUzE3LjUgMiAxMiAyek0xMiAxOGMtMy4zIDAtNi0yLjctNi02czIuNy02IDYtNiA2IDIuNyA2IDYtMi43IDYtNiA2eiIgZmlsbD0iIzI2QTE3QiIvPjwvc3ZnPg==');
}

.zanshang-option-text {
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s;
}

/* 提交按钮 - 使用父主题的button样式 */
.zanshang-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.zanshang-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.zanshang-submit.loading {
    cursor: wait;
}

.zanshang-submit.loading .zanshang-btn-text {
    visibility: hidden;
}

.zanshang-loading-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: zanshang-spin 0.8s linear infinite;
    pointer-events: none;
    opacity: 0.6;
}

.zanshang-submit.loading .zanshang-loading-spinner {
    display: block;
}

@keyframes zanshang-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 二维码支付弹窗 */
.zanshang-qrcode-modal {
    text-align: center;
    padding: 1.5rem;
}

.zanshang-qrcode-modal p {
    margin-bottom: 1.5rem;
    opacity: 0.7;
    font-size: 0.95rem;
}

.zanshang-qrcode-wrapper {
    display: inline-block;
    padding: 1.5rem;
    background-color: var(--background-color-100, #f4f4f4);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.zanshang-qrcode-wrapper img {
    width: 250px;
    height: 250px;
    display: block;
}

.zanshang-order-info {
    margin-top: 1rem;
    font-size: 0.85rem;
    opacity: 0.6;
}

/* 支付成功/错误消息 */
.zanshang-payment-success,
.zanshang-payment-error {
    max-width: 600px;
    margin: 0 auto 2rem;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    text-align: center;
}

.zanshang-payment-success {
    background-color: var(--txt-color-10, rgba(51, 51, 51, 0.1));
    border: 1px solid var(--accent-color, #0088FF);
}

.zanshang-success-message {
    margin: 0;
    color: var(--accent-color, #0088FF);
    font-weight: 500;
}

.zanshang-payment-error {
    background-color: var(--txt-color-10, rgba(51, 51, 51, 0.1));
    border: 1px solid var(--txt-color-50, rgba(51, 51, 51, 0.5));
}

.zanshang-error-message {
    margin: 0;
    color: var(--txt-color-100, #333333);
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .zanshang-container {
        padding: 1.5rem 0;
    }
    
    .zanshang-title {
        font-size: 1.5rem;
    }
    
    .zanshang-preset-amounts {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .zanshang-preset-amount-btn {
        padding: 0.6rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .zanshang-payment-options {
        grid-template-columns: 1fr;
    }
    
    #amount {
        font-size: 1.1rem;
        padding: 0.75rem 0.875rem 0.75rem 2.2rem;
    }
    
    .zanshang-qrcode-wrapper img {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .zanshang-container {
        padding: 1rem 0;
    }
    
    .zanshang-preset-amounts {
        grid-template-columns: repeat(2, 1fr);
    }
}
