/* 服务发布页面样式 */

.form-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-bottom: 24px;
    display: none; /* 默认隐藏所有表单部分 */
}

.form-section.active {
    display: block; /* 显示激活的表单部分 */
}

.form-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.budget-option {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.budget-option:hover {
    border-color: #2A62E3;
}

.budget-option.active {
    border-color: #2A62E3;
    background-color: #f0f7ff;
}

.submit-btn {
    background-color: #2A62E3;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submit-btn:hover {
    background-color: #1e4fc0;
}

.next-btn {
    background-color: #2A62E3;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.next-btn:hover {
    background-color: #1e4fc0;
}

.preview-btn {
    background-color: white;
    color: #2A62E3;
    border: 1px solid #2A62E3;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.preview-btn:hover {
    background-color: #f0f7ff;
}

.progress-bar {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    margin-bottom: 30px;
}

.progress-bar-fill {
    height: 100%;
    background-color: #2A62E3;
    border-radius: 4px;
    transition: width 0.3s;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: 600;
    transition: all 0.3s;
}

.step.active .step-number {
    background-color: #2A62E3;
    color: white;
}

.step.completed .step-number {
    background-color: #28a745;
    color: white;
}

.step-title {
    font-size: 14px;
    color: #6c757d;
    transition: all 0.3s;
}

.step.active .step-title {
    color: #2A62E3;
    font-weight: 600;
}

.step.completed .step-title {
    color: #28a745;
}

.step-line {
    position: absolute;
    top: 15px;
    height: 2px;
    width: 100%;
    background-color: #e9ecef;
    left: 50%;
    z-index: -1;
}

.step:last-child .step-line {
    display: none;
}

.preview-container {
    display: none;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-bottom: 24px;
}

.preview-container.active {
    display: block;
}

.preview-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.preview-section:last-child {
    border-bottom: none;
}

.preview-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.preview-item {
    margin-bottom: 10px;
}

.preview-label {
    font-weight: 600;
    color: #6c757d;
}

.preview-value {
    color: #333;
}

/* 预览页面按钮样式 */
.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
    transition: all 0.2s;
}

.btn-outline-secondary:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-outline-primary {
    color: #2A62E3;
    border-color: #2A62E3;
    transition: all 0.2s;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #2A62E3;
    border-color: #2A62E3;
}

.btn-primary {
    color: #fff;
    background-color: #2A62E3;
    border-color: #2A62E3;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: #1e4fc0;
    border-color: #1e4fc0;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
    border-radius: 0.5rem;
}

/* 预览页面标题栏样式 */
.preview-container h2 {
    color: #333;
    font-weight: 600;
}

/* 提交按钮加载状态样式 */
.btn-primary.submitting {
    background-color: #1e4fc0;
    opacity: 0.8;
    cursor: not-allowed;
    position: relative;
}

.btn-primary.submitting .fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* Toast消息样式 */
.toast-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 350px;
    width: auto;
}

.toast-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-icon {
    margin-right: 12px;
    font-size: 20px;
}

.toast-content {
    font-size: 14px;
    line-height: 1.4;
}

.toast-success .toast-icon {
    color: #28a745;
}

.toast-error .toast-icon {
    color: #dc3545;
}

.toast-info .toast-icon {
    color: #17a2b8;
}

/* 无效字段样式 */
.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* 添加新的样式 */
.category-selection {
    width: 100%;
}

.category-columns {
    display: flex;
    gap: 15px;
}

.category-column {
    flex: 1;
}

.description-container {
    position: relative;
}

.fanwen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 14px;
    padding: 5px 10px;
    z-index: 1;
}
/* 范文弹窗样式 */
.fanwen-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
}

.fanwen-modal-content {
    background-color: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.fanwen-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
}

.fanwen-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.fanwen-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    line-height: 1.6;
    font-size: 16px;
    max-height: 60vh;
}

.fanwen-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.fanwen-loading {
    text-align: center;
    padding: 30px;
    color: #6c757d;
}

/* 图片上传区域样式 */
.upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

.upload-area:hover {
    border-color: #2A62E3;
    background-color: #f0f7ff;
}

.upload-area.dragover {
    border-color: #2A62E3;
    background-color: #f0f7ff;
    box-shadow: 0 0 10px rgba(42, 98, 227, 0.2);
}

.image-upload-icon {
    font-size: 36px;
    color: #2A62E3;
    margin-bottom: 15px;
}

.image-upload-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
}

.image-upload-hint {
    font-size: 14px;
    color: #666;
}

.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.image-preview-item {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.image-preview-remove:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

/* 服务类型选择 */
.service-type-selection {
    width: 100%;
}

.form-check {
    padding-left: 0;
    margin-bottom: 0;
}

.form-check-input {
    margin-right: 8px;
}

.form-check-label {
    cursor: pointer;
}

/* 响应式调整 */
@media (max-width: 768px) {
    
    .image-preview-item {
        width: 100px;
        height: 100px;
    }
    
    .fanwen-modal-content {
        width: 95%;
        max-height: 95vh;
    }
}