/* 檔案：demand-editor/assets/css/demand-editor.css */

/* 基本樣式 */
.demand-editor-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
}

.demand-editor-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.demand-editor-section:hover {
    transform: translateY(-2px);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 1.1em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 5px rgba(0,123,255,0.3);
}

.form-group input[type="date"] {
    width: auto;
    padding: 10px;
}

.form-group.required label:after {
    content: '*';
    color: #e74c3c;
    margin-left: 4px;
}

button, .edit-btn, .delete-btn {
    background: #007bff;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s ease, transform 0.2s ease;
}

button:hover, .edit-btn:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.delete-btn {
    background: #dc3545;
    margin-left: 10px;
}

.delete-btn:hover {
    background: #c82333;
    transform: scale(1.05);
}

.demand-post-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.demand-post-table th, .demand-post-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.demand-post-table th {
    background: #007bff;
    color: white;
    font-weight: 600;
}

.demand-post-table tr:hover {
    background: #f1f1f1;
}

.status {
    color: #27ae60;
    font-weight: 500;
    padding: 5px 10px;
    background: #e8f5e9;
    border-radius: 4px;
    display: inline-block;
}

.overdue-date {
    color: #e74c3c; /* 逾期日期顯示紅色 */
    font-weight: bold;
}

.overdue-status {
    color: #e74c3c; /* 逾期狀態顯示紅色 */
    font-weight: bold;
}

.ongoing-status {
    color: #3498db; /* 進行中顯示藍色 */
    font-weight: bold;
}

.closed-status {
    color: #7f8c8d; /* 已結案顯示灰色 */
    font-weight: bold;
}

.demand-editor-error {
    color: #e74c3c;
    font-weight: 600;
    padding: 10px;
    background: #fdecea;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 20px;
}

/* 響應式設計：手機板優化 */
@media screen and (max-width: 768px) {
    .demand-editor-container {
        padding: 10px;
    }

    .demand-editor-section {
        padding: 15px;
    }

    .demand-post-table {
        display: block;
        overflow-x: auto; /* 水平滾動 */
    }

    .demand-post-table th,
    .demand-post-table td {
        min-width: 120px; /* 確保最小寬度 */
        padding: 10px;
        font-size: 0.9em;
    }

    .demand-post-table th {
        font-size: 1em;
    }

    .demand-post-table td.actions {
        display: flex;
        gap: 5px;
        padding: 5px;
    }

    .edit-btn, .delete-btn {
        padding: 8px 12px;
        font-size: 0.9em;
    }
}