/* 组件样式文件 - 具体组件的样式 */

/* 服务选择卡片样式 */
.component-card {
    background: white;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    cursor: pointer;
}

.component-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-color: #d1d5db;
}

.component-card.selected {
    border-color: #2563eb;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.component-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.component-badge {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    min-width: 24px;
    text-align: center;
}

.component-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
    flex: 1;
}

.component-desc {
    color: #6b7280;
    font-size: 0.75rem;
    margin-bottom: 10px;
    padding: 4px 8px;
    background: #f9fafb;
    border-radius: 4px;
    border-left: 2px solid #e5e7eb;
    line-height: 1.3;
}

/* 展开/收起功能样式 */
.sub-items-container {
    margin-top: 8px;
    padding-left: 16px;
    border-left: 2px solid #e5e7eb;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.sub-items-container.expanded {
    max-height: 500px;
    opacity: 1;
}

.expand-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #6b7280;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-top: 4px;
}

.expand-toggle:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.expand-icon {
    transition: transform 0.2s ease;
    font-size: 0.8rem;
}

.expand-icon.rotated {
    transform: rotate(90deg);
}

/* 复选框样式 */
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.checkbox-item:hover {
    background-color: #f9fafb;
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
}

.checkbox-item label {
    margin: 0;
    font-weight: 500;
    cursor: pointer;
    color: #374151;
    font-size: 0.85rem;
}

/* 表单控件样式 */
.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: #374151;
    font-size: 0.85rem;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control:hover {
    border-color: #d1d5db;
}

.input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.help-text {
    font-size: 0.7rem;
    color: #6b7280;
    margin-top: 2px;
    line-height: 1.2;
}

/* 用量输入区域样式 */
.usage-input-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
}

.usage-input-title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.usage-input-title::before {
    content: '📊';
    font-size: 0.9rem;
}

.usage-form-group {
    margin-bottom: 12px;
}

.usage-form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: #374151;
    font-size: 0.85rem;
}

.usage-form-control {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    background: white;
}

.usage-form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.usage-input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* 按钮样式 */
.calculate-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 16px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.calculate-btn:active {
    transform: translateY(0);
}

.auto-calculate-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #10b981;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 8px;
}

.auto-calculate-badge::before {
    content: '⚡';
    font-size: 0.8rem;
}