/* 定义全局颜色变量，并添加 xs 前缀 */
:root {
    --xs-primary-color: #0073aa; /* 主色调，用于按钮背景等 */
    --xs-error-color: #f44336; /* 错误提示颜色 */
    --xs-text-primary-color: #333; /* 主要文本颜色 */
    --xs-text-secondary-color: #666; /* 次要文本颜色 */
    --xs-border-color: #eee; /* 边框颜色 */
    --xs-background-color: #fafafa; /* 背景颜色 */
}



/* checkout */

/* 整体容器 */
.xenice-sell-checkout {
    max-width: 600px;
    margin: 30px auto;
    font-family: sans-serif;
    line-height: 1.5;
}

.xenice-sell-checkout form{
    display: block;
}

/* 商品摘要区 */
.xenice-product-summary {
    border: 1px solid var(--xs-border-color);
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    background: var(--xs-background-color);
    text-align: center;
}

.xenice-product-image-wrapper {
    margin-bottom: 12px;
}

.xenice-product-image {
    max-width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
}

.xenice-product-name {
    font-size: 18px;
    font-weight: bold;
}

.xenice-product-price {
    margin-top: 8px;
    font-size: 20px;
    color: #d32f2f;
    font-weight: bold;
}

/* 表单字段 */
.xenice-form-field {
    margin-bottom: 16px;
}

.xenice-form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
}

.xenice-form-input,
.xenice-form-textarea {
    width: 100%;
    padding: 10px;
    margin: 6px 0;
    border: 1px solid var(--xs-border-color);
    border-radius: 4px;
    box-sizing: border-box;
}

.xenice-form-textarea {
    height: 60px;
    min-height: auto;
    resize: vertical;
}

/* 支付方式 */
.xenice-payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.xenice-payment-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.xenice-payment-option input[type="radio"] {
    margin: 0;
}

.xenice-payment-icon {
    vertical-align: middle;
    width:24px;
    height:24px;
}

.xenice-payment-empty {
    padding: 12px 0;
    color: var(--xs-text-secondary-color);
    font-style: italic;
    text-align: center;
    border: 1px dashed var(--xs-border-color);
    border-radius: 6px;
    background-color: var(--xs-background-color);
    font-size: 0.95rem;
}

/* 提交按钮 */
.xenice-checkout-submit {
    background: var(--xs-primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
    display: inline-block;
    line-height: 1.6;
}
.xenice-checkout-submit:hover {
    opacity: 0.95;
}
.xenice-checkout-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 错误提示 */
.xenice-sell-error {
    color: var(--xs-error-color);
    padding: 12px;
    background: #ffebee;
    border-radius: 4px;
    margin: 15px 0;
}

/* order review */

.xenice-order-details {
    max-width: 700px;
    margin: 30px auto;
    padding: 20px;
    border: 1px solid var(--xs-border-color);
    border-radius: 5px;
    line-height: 1.6;
}

.xenice-thank-you {
    margin-top: 24px;
    margin-bottom:20px;
    text-align: center;
    color: var(--xs-text-secondary-color);
    font-size: 1.2em;
}



.xenice-download-container {
    text-align: center;
    margin-top: 15px;
}

.xenice-download-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--xs-primary-color);
    color: white!important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
}

.xenice-download-button:hover {
    opacity: 0.95;
}

.xenice-download-expired {
    text-align: center;
    margin-top: 24px;
    color: var(--xs-error-color);
}

.xenice-order-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.xenice-order-table tr:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.xenice-order-label {
    padding: 10px 0;
    width: 35%;
    vertical-align: top;
    color: var(--xs-text-primary-color);
    font-weight: 600;
}

.xenice-order-value {
    padding: 10px 0;
    width: 65%;
    vertical-align: top;
}

.xenice-customer-message {
    color: var(--xs-text-secondary-color);
    font-style: italic;
}

.xenice-error {
    color: var(--xs-error-color);
}

.xenice-order-details .xs-status {
    text-transform: capitalize;
    color: #ff9800;
}

.xenice-order-details .xs-completed {
    color: #4caf50;
}

.xenice-order-details .xs-cancelled {
    color: var(--xs-error-color);
}

.xenice-order-details .xs-processing {
    color: #2196f3;
}

/* access button */
.xenice-sell-access-button {}

.xenice-sell-download-btn,
.xenice-sell-buy-btn {
    display: inline-block;
    padding: 8px 16px;
    color: white!important;
    text-decoration: none;
    border-radius: 4px;
}

.xenice-sell-download-btn {
    background-color: var(--xs-primary-color); /* 绿色：下载 */
}

.xenice-sell-buy-btn {
    background-color: var(--xs-primary-color); /* 蓝色：购买 */
}

.xenice-sell-error {
    color: var(--xs-error-color); /* 红色：错误提示 */
}

.xenice-sell-expired {
    color: var(--xs-text-primary-color);
    margin-right: 10px;
}

.xenice-sell-purchased {
    color: var(--xs-primary-color); /* 绿色：已购买 */
}