/* 
 * report-submit.css
 * 用户报告提交组件样式
 * 设计理念：清晰的分组表单，友好的用户体验
 */

/* 主容器样式 */
.report-submit {
    padding: 4rem 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    position: relative;
}

.report-submit__container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.report-submit__title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.report-submit__subtitle {
    font-size: 1.25rem;
    color: #cbd5e1;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 表单容器 */
.report-submit__form-container {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid #334155;
    border-radius: 1.5rem;
    padding: 3rem;
    margin-bottom: 3rem;
}

/* 表单分组 */
.report-submit__form-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #374151;
}

.report-submit__form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 2rem;
}

.report-submit__section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.report-submit__section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    border-radius: 2px;
}

/* 表单网格布局 */
.report-submit__form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .report-submit__form-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .report-submit__form-grid--full {
        grid-template-columns: 1fr;
    }
}

/* 表单组样式 */
.report-submit__form-group {
    display: flex;
    flex-direction: column;
}

.report-submit__label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.75rem;
}

.report-submit__label-required::after {
    content: '*';
    color: #ef4444;
    margin-left: 0.25rem;
}

.report-submit__help-text {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* 输入框样式 */
.report-submit__input,
.report-submit__select,
.report-submit__textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: #1e293b;
    border: 2px solid #475569;
    border-radius: 0.75rem;
    color: #f1f5f9;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.report-submit__input:focus,
.report-submit__select:focus,
.report-submit__textarea:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.report-submit__input:hover,
.report-submit__select:hover,
.report-submit__textarea:hover {
    border-color: #64748b;
}

.report-submit__textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

/* 产品选择器特殊样式 */
.report-submit__product-selector {
    position: relative;
}

.report-submit__product-search {
    width: 100%;
    padding: 1rem 1.25rem;
    background: #1e293b;
    border: 2px solid #475569;
    border-radius: 0.75rem;
    color: #f1f5f9;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.report-submit__product-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 0.75rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    display: none;
}

.report-submit__product-results--show {
    display: block;
}

.report-submit__product-option {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #374151;
    cursor: pointer;
    transition: background 0.2s ease;
}

.report-submit__product-option:hover {
    background: rgba(96, 165, 250, 0.1);
}

.report-submit__product-option:last-child {
    border-bottom: none;
}

.report-submit__product-name {
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 0.25rem;
}

.report-submit__product-brand {
    font-size: 0.875rem;
    color: #94a3b8;
}

/* 评分输入样式 */
.report-submit__rating-input {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.report-submit__rating-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 6px;
    background: #374151;
    border-radius: 3px;
    outline: none;
}

.report-submit__rating-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #60a5fa;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.report-submit__rating-slider::-webkit-slider-thumb:hover {
    background: #3b82f6;
    transform: scale(1.1);
}

.report-submit__rating-value {
    min-width: 30px;
    text-align: center;
    font-weight: 700;
    color: #60a5fa;
    font-size: 1.125rem;
}

/* 提交按钮 */
.report-submit__submit {
    width: 100%;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, #10b981, #34d399);
    border: none;
    border-radius: 0.75rem;
    color: white;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.report-submit__submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.report-submit__submit:active {
    transform: translateY(0);
}

.report-submit__submit:disabled {
    background: #6b7280;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 结果容器 */
.report-submit__result {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid #334155;
    border-radius: 1.5rem;
    padding: 3rem;
    margin-top: 2rem;
    display: none;
}

.report-submit__result--show {
    display: block;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 成功结果 */
.report-submit__success {
    text-align: center;
}

.report-submit__success-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.report-submit__success-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 1rem;
}

.report-submit__success-message {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin-bottom: 2rem;
}

.report-submit__report-preview {
    background: rgba(96, 165, 250, 0.05);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 1rem;
    padding: 2rem;
    margin: 2rem 0;
    text-align: left;
}

.report-submit__preview-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 1rem;
    text-align: center;
}

.report-submit__preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.report-submit__preview-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.report-submit__preview-label {
    font-size: 0.875rem;
    color: #94a3b8;
}

.report-submit__preview-value {
    font-weight: 600;
    color: #e2e8f0;
}

/* 错误结果 */
.report-submit__error {
    text-align: center;
}

.report-submit__error-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.report-submit__error-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ef4444;
    margin-bottom: 1rem;
}

.report-submit__error-message {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #fca5a5;
    margin-bottom: 2rem;
}

/* 行动按钮 */
.report-submit__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.report-submit__action-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.report-submit__action-btn--primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
}

.report-submit__action-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.report-submit__action-btn--secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border: 1px solid #475569;
}

.report-submit__action-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #60a5fa;
}

/* 表单验证样式 */
.report-submit__input:invalid,
.report-submit__select:invalid {
    border-color: #ef4444;
}

.report-submit__error-text {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.report-submit__input:invalid + .report-submit__error-text,
.report-submit__select:invalid + .report-submit__error-text {
    display: block;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .report-submit__form-container,
    .report-submit__result {
        padding: 2rem 1.5rem;
    }
    
    .report-submit__form-grid {
        grid-template-columns: 1fr;
    }
    
    .report-submit__rating-input {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .report-submit__actions {
        flex-direction: column;
    }
    
    .report-submit__action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* 加载状态 */
.report-submit__loading {
    text-align: center;
    padding: 2rem;
    color: #94a3b8;
}

.report-submit__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #374151;
    border-top: 3px solid #60a5fa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}