/* =================================== */
/* Complaints Page                     */
/* =================================== */

.complaint-item {
    background: white;
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--border-radius-base);
    margin-bottom: 15px;
}

.complaint-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap; /* 창이 좁을 때 줄바꿈 허용 */
}

.complaint-header h4 {
    margin: 0 0 10px 0; /* 제목 아래 여백 추가 */
    flex-basis: 100%; /* 기본적으로 한 줄을 모두 차지하도록 설정 */
}

.complaint-header .header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%; /* 모바일에서 한 줄을 차지하도록 */
    justify-content: space-between; /* 배지와 버튼을 양쪽 끝으로 */
}

.status-badge {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 700;
    color: white;
}

.status-received { background-color: #6c757d; }
.status-pending { background-color: #ffc107; color: #333 }
.status-answered { background-color: var(--primary-color); }

.complaint-answer {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: var(--border-radius-base);
    border: 1px solid #e9ecef;
}

.complaint-answer h5 {
    margin: 0 0 10px;
    color: var(--primary-color);
}

.admin-controls {
    margin-top: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-base);
    background-color: #fafafa;
}

.admin-controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #e0e0e0;
}

.admin-controls-header h5 {
    margin: 0;
    font-size: 1em;
    color: #555;
}

.admin-toggle-btn {
    background: none; 
    border: none; 
    font-size: 1em; 
    cursor: pointer;
    transition: transform 0.3s;
}

.admin-controls-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding: 0 15px;
}

.admin-controls-content.open {
    max-height: 500px;
    padding: 15px;
}

.status-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.answer-form {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-controls {
    display: flex;
    gap: 10px;
}

.complaint-edit-form .button-group {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

/* [수정] PC에서는 기존 레이아웃 유지 */
@media (min-width: 769px) {
    .complaint-header h4 {
        flex-basis: auto; /* PC에서는 원래대로 자동 너비 */
        margin-bottom: 0; /* PC에서는 제목 아래 여백 제거 */
    }
    .complaint-header .header-right {
        width: auto; /* PC에서는 원래대로 자동 너비 */
        justify-content: flex-end; /* 원래대로 오른쪽 정렬 */
    }
}

