/* 发布活动页面样式 */

/* 页面头部 */
.publish-header {
    text-align: center;
    padding: 2rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.publish-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.publish-header .subtitle {
    font-size: 0.95rem;
    opacity: 0.95;
}

/* 发布表单 */
.publish-form {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 步骤指示器 */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.step-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-align: center;
}

.step.active .step-label {
    color: #667eea;
    font-weight: 600;
}

.step-line {
    flex: 1;
    height: 2px;
    background: #e9ecef;
    margin: 0 0.5rem;
    margin-top: -1.5rem;
}

.step.active + .step-line {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

/* 表单区块 */
.form-section {
    display: none;
}

.form-section.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

/* 表单组 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: white;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-tip {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

.required {
    color: #dc3545;
}

/* 文件上传 */
.file-upload {
    border: 2px dashed #ced4da;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.upload-icon {
    font-size: 3rem;
}

.upload-placeholder p {
    margin: 0;
    color: #495057;
}

.upload-preview {
    position: relative;
    display: inline-block;
}

.upload-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
}

.btn-remove {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #dc3545;
    color: white;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* 表单操作按钮 */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.form-actions .btn {
    flex: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .publish-form {
        padding: 1.5rem 1rem;
    }

    .step-indicator {
        margin-bottom: 2rem;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }

    .step-label {
        font-size: 0.625rem;
    }

    .section-title {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .double-col {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-actions {
        flex-direction: column;
    }

    .upload-icon {
        font-size: 2rem;
    }

    .upload-preview img {
        max-width: 150px;
        max-height: 150px;
    }
}

@media (max-width: 480px) {
    .publish-header h1 {
        font-size: 1.5rem;
    }

    .publish-header .subtitle {
        font-size: 0.875rem;
    }

    .step-label {
        display: none;
    }
}

/* 地区选择器样式 */
.location-selector-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 0.5rem;
}

.location-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    font-size: 0.95rem;
    background-color: white;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.location-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.location-select:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.65;
}

@media (max-width: 768px) {
    .location-selector-group {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* 隐藏类 */
.d-none {
    display: none !important;
}

/* 地理位置按钮和状态 */
.location-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.location-status {
    font-size: 0.875rem;
    font-weight: 500;
}

#getLocationBtn {
    flex-shrink: 0;
}

#getLocationBtn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* 安全提示 */
.security-tip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #28a745;
    background: #d4edda;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}
