/**
 * Doop Payment Frontend Styles
 * 
 * 支付表单样式
 */

/* 支付表单容器 */
.doop-payment-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
}

/* 表单部分 */
.doop-form-section {
    margin-bottom: 25px;
}

.doop-form-section h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #333;
}

/* 表单行 */
.form-row {
    margin-bottom: 15px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-row .required {
    color: #e74c3c;
}

.form-row input,
.form-row select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.form-row input:focus,
.form-row select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* 内联表单行 */
.form-row-inline {
    display: flex;
    gap: 15px;
}

.form-col {
    flex: 1;
}

/* 卡号输入 */
#doop-card-number {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

/* 卡类型显示 */
.card-type {
    display: inline-block;
    background: #2c3e50;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 10px;
    text-transform: uppercase;
}

.card-type.visa {
    background: #1a1f71;
}

.card-type.mastercard {
    background: #eb001b;
}

.card-type.amex {
    background: #006fcf;
}

.card-type.discover {
    background: #ff6000;
}

/* 到期日期选择 */
#doop-expiry-month,
#doop-expiry-year {
    width: 100%;
}

/* CVV输入 */
#doop-cvv {
    font-family: 'Courier New', monospace;
    text-align: center;
}

/* 支付按钮 */
.doop-pay-button {
    width: 100%;
    padding: 15px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doop-pay-button:hover {
    background: #2980b9;
}

.doop-pay-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

/* 结果消息 */
#doop-payment-result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    display: none;
}

.doop-result-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.doop-result-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .doop-payment-form-wrapper {
        padding: 15px;
    }

    .form-row-inline {
        flex-direction: column;
        gap: 15px;
    }

    .form-row input,
    .form-row select {
        font-size: 16px;
        /* 防止iOS缩放 */
    }
}

/* 安全提示 */
.doop-security-info {
    background: #e8f5e8;
    border: 1px solid #c3e6c3;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

.doop-security-info:before {
    content: "🔒 ";
    margin-right: 5px;
}

/* 加载状态 */
.doop-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: doop-spin 1s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes doop-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 状态指示器 */