/**
 * 投稿页面资源出售面板样式
 * 
 * @package QilingShop
 * @since   1.1.0
 */

/* CSS 变量 - 使用主题色或默认蓝绿色 */
.qls-sell-panel {
    --qls-primary: var(--color-primary, #0ea5e9);
    --qls-primary-dark: var(--color-primary-dark, #0284c7);
    --qls-primary-light: var(--color-primary-light, #38bdf8);
    --qls-accent: #10b981;
    --qls-accent-dark: #059669;
    --qls-accent-light: #34d399;
}

/* ========================================
   资源出售面板
   ======================================== */
.qls-sell-panel {
    margin-top: 24px;
    padding: 0;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

.qls-sell-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(16, 185, 129, 0.08) 100%);
    font-weight: 600;
    font-size: 1rem;
    color: #0369a1;
    border-bottom: 1px solid rgba(14, 165, 233, 0.15);
}

.qls-sell-panel-header svg {
    color: var(--qls-primary);
}

.qls-sell-badge {
    margin-left: auto;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--qls-accent) 0%, var(--qls-accent-dark) 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
}

.qls-sell-panel-content {
    padding: 20px;
}

/* ========================================
   开关样式
   ======================================== */
.qls-sell-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.qls-toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.qls-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.qls-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 26px;
}

.qls-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.qls-toggle-switch input:checked+.qls-toggle-slider {
    background: linear-gradient(135deg, var(--qls-primary) 0%, var(--qls-accent) 100%);
}

.qls-toggle-switch input:checked+.qls-toggle-slider:before {
    transform: translateX(22px);
}

.qls-toggle-label {
    font-weight: 600;
    color: #1f2937;
}

.qls-toggle-hint {
    flex-basis: 100%;
    margin-top: 4px;
    margin-left: 60px;
    font-size: 13px;
    color: #6b7280;
}

/* ========================================
   出售选项
   ======================================== */
.qls-sell-options {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(14, 165, 233, 0.15);
}

.qls-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 16px;
}

.qls-form-row:last-of-type {
    margin-bottom: 0;
}

.qls-form-group {
    display: flex;
    flex-direction: column;
}

.qls-form-group label {
    font-weight: 500;
    margin-bottom: 8px;
    color: #374151;
}

.qls-input-group {
    display: flex;
    align-items: stretch;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.qls-input-group:focus-within {
    border-color: var(--qls-primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.qls-input-group input {
    flex: 1;
    border: none !important;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    background: transparent;
}

.qls-input-suffix {
    display: flex;
    align-items: center;
    padding: 0 14px;
    background: #f9fafb;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    border-left: 1px solid #e5e7eb;
}

.qls-form-group select {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.qls-form-group select:focus {
    border-color: var(--qls-primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
    outline: none;
}

.qls-form-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #9ca3af;
}

.qls-form-hint code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
}

/* 全宽表单组 */
.qls-full-width {
    grid-column: 1 / -1;
}

.qls-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.qls-form-group textarea:focus {
    border-color: var(--qls-primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
    outline: none;
}

.qls-form-group textarea::placeholder {
    color: #9ca3af;
}

/* ========================================
   提成说明
   ======================================== */
.qls-commission-info {
    margin-top: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-radius: 10px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.qls-commission-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.qls-commission-text strong {
    display: block;
    margin-bottom: 6px;
    color: #065f46;
    font-size: 14px;
}

.qls-commission-text p {
    margin: 0;
    font-size: 13px;
    color: #047857;
    line-height: 1.5;
}

.qls-commission-text p strong {
    display: inline;
    color: var(--qls-accent-dark);
    font-size: inherit;
}

/* ========================================
   响应式
   ======================================== */
@media (max-width: 640px) {
    .qls-sell-panel-header {
        flex-wrap: wrap;
    }

    .qls-sell-badge {
        margin-left: 30px;
        margin-top: 8px;
    }

    .qls-toggle-hint {
        margin-left: 0;
    }

    .qls-form-row {
        grid-template-columns: 1fr;
    }
}