@charset "utf-8";

/* ===================================
 * 게시판 쓰기 영역 - 기본 레이아웃
 * =================================== */
#bo_w .list-group-item {
    padding-left: 0;
    padding-right: 0;
    border-left: 0;
    border-right: 0;
}

#bo_w #wr_content {
    margin-bottom: 1.0rem !important;
}

/* ===================================
 * 리뷰 쓰기 영역 - 공통
 * =================================== */
.review-write-wrap {
    margin: 20px 0;
}

/* 섹션 타이틀 스타일 */
.store-info h3,
.group-type-title {
    padding: 15px;
    margin: 0 0 20px;
    background: #f8f9fa;
    border-left: 4px solid #4a90e2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 그룹 추가 버튼 */
.btn-add-group {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    background: #28a745;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.btn-add-group:hover {
    background: #218838;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
    transform: translateY(-1px);
}

.btn-add-group i {
    font-size: 12px;
}

/* ===================================
 * 리뷰 그룹 컨테이너
 * =================================== */
.store-info,
.review-groups {
    margin-bottom: 30px;
}

.review-group-container {
    margin-bottom: 40px;
}

/* 리뷰 그룹 */
.review-group {
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #fff;
}

/* 리뷰 그룹 헤더 */
.review-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

/* 그룹 컨트롤 버튼 */
.group-controls {
    display: flex;
    gap: 5px;
}

.btn-move-group,
.btn-delete-group {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    background: #fff;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-move-group:hover {
    background: #e9ecef;
}

.btn-delete-group:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

/* ===================================
 * 평가 항목 - 레이팅 바
 * =================================== */
/* 레이팅 컨테이너 */
.rating-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

/* 레이팅 바 컨테이너 */
.rating-bar-container {
    position: relative;
    flex: 1;
    height: 48px;
    background: #f0f0f0;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* 그리드 라인 - 양방향 */
.rating-grid.bidirectional {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    z-index: 2;
}

.rating-grid.bidirectional .rating-grid-line {
    position: relative;
    width: 2px;
    height: 100%;
    background: rgba(255,255,255,0.5);
}

.rating-grid.bidirectional .rating-grid-line:after {
    content: '';
    position: absolute;
    left: -1px;
    width: 2px;
    height: 100%;
    background: rgba(0,0,0,0.08);
}

.rating-grid.bidirectional .rating-grid-line.center {
    width: 2px;
    background: rgba(0,0,0,0.2);
}

/* 레이팅 바 - 공통 스타일 */
.rating-bar {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.2s ease;
    z-index: 1;
}

/* 단방향 레이팅 바 */
.rating-bar:not(.bidirectional) {
    left: 0;
    width: 0%;
    background: linear-gradient(90deg, #4a90e2, #64b5f6);
    border-radius: 6px;
}

/* 양방향 레이팅 바 */
.rating-bar.bidirectional {
    width: 50%;
}

.rating-bar.bidirectional[data-value^="-"] {
    right: 50%;
    background: linear-gradient(90deg, #ff4444, #ff8f66);  /* 빨간색에서 주황색으로 */
    border-radius: 6px 0 0 6px;
}

.rating-bar.bidirectional[data-value^="+"] {
    left: 50%;
    background: linear-gradient(90deg, #4a90e2, #64b5f6);  /* 파란색 그라데이션으로 통일 */
    border-radius: 0 6px 6px 0;
}

.rating-bar.bidirectional[data-value="0"] {
    width: 2px !important;
    left: calc(50% - 1px);
    background: #888;
}

/* 일반 그리드 라인 (단방향) */
.rating-grid:not(.bidirectional) {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    z-index: 2;
}

.rating-grid:not(.bidirectional) .rating-grid-line {
    position: relative;
    width: 2px;
    height: 100%;
    background: rgba(255,255,255,0.5);
}

.rating-grid:not(.bidirectional) .rating-grid-line:after {
    content: '';
    position: absolute;
    left: -1px;
    width: 2px;
    height: 100%;
    background: rgba(0,0,0,0.08);
}

/* 항목명 표시 */
.rating-title-box {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    font-size: 16px;
    font-weight: 500;
    max-width: calc(100% - 120px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 4px;
    backdrop-filter: blur(4px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    color: #2c3e50;
    border-left: 3px solid #4a90e2;
    transition: all 0.2s ease;
}

/* 호버 효과 */
.rating-bar-container:hover .rating-title-box {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) translateX(2px);
}

/* 점수 표시 */
.rating-text-box {
    min-width: 80px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    color: #495057;
    background: white;
    padding: 4px 12px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
}

/* 가이드 텍스트 */
.rating-guide {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
}

.rating-score {
    white-space: nowrap;
}

.rating-value {
    color: #4a90e2;
    font-weight: 600;
}

/* 초기화 알림 스타일 */
.reset-notification {
    position: absolute;
    right: 10px;
    top: -30px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 13px;
    animation: fadeInOut 2s ease-in-out;
    z-index: 5;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(10px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

/* 드래그 방지 */
.rating-bar-container {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .rating-bar-container {
        height: 42px;
    }
    
    .rating-title-box {
        font-size: 14px;
        padding: 4px 10px;
    }
    
    .rating-text-box {
        min-width: 60px;
        font-size: 13px;
        padding: 4px 8px;
    }
    
    .rating-guide {
        font-size: 12px;
    }
}
/* ===================================
 * 이미지 업로드 영역
 * =================================== */
.review-images {
    margin-top: 20px;
}

/* 이미지 미리보기 */
.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    margin-right: 35px;
}

.preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

/* 이미지 컨트롤 버튼 */
.img-controls {
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 1;
}

.btn-move-img {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 3px;
    cursor: pointer;
}

.btn-move-img:hover {
    background: #f8f9fa;
}

.preview-remove {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

/* ===================================
 * 폼 요소 스타일
 * =================================== */
.text-danger {
    color: #dc3545;
}

.form-text {
    font-size: 0.875rem;
}

.review-items .form-group input[type="text"] {
    height: 50px;
}

.custom-file-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-item-title {
    min-width: 120px;
    margin: 0 1rem 0 0;
    font-weight: 500;  
    color: #2c3e50;
    font-size: 16px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 4px;
    backdrop-filter: blur(4px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-left: 3px solid #4a90e2;
}

/* ===================================
 * 반응형 스타일
 * =================================== */
@media (max-width: 768px) {
    /* 레이팅 바 */
    .rating-bar-container {
        height: 42px;
    }

    .rating-bar {
        height: 42px;
    }

.rating-title-box {
    font-size: 14px;
    padding: 4px 10px;
}

    .rating-text-box {
        min-width: 60px;
        font-size: 13px;
        padding: 4px 8px;
    }
    
    .rating-guide {
        font-size: 12px;
    }

    /* 그룹 헤더 */
    .group-type-title,
    .review-group-header {
        flex-direction: row !important;
        justify-content: space-between !important;
        gap: 10px !important;
    }

    .btn-add-group {
        width: auto !important;
        padding: 5px 15px !important;
    }

    .group-controls {
        width: auto !important;
        justify-content: flex-end !important;
    }

    /* 버튼 크기 조정 */
    .btn-move-group,
    .btn-delete-group {
        width: 34px;
        height: 34px;
        font-size: 14px;
        padding: 0;
        border-width: 1px;
    }

    /* 이미지 컨트롤 */
    .img-controls {
        right: 5px;
        top: 5px;
        transform: none;
        flex-direction: row;
    }

    /* 폼 레이아웃 */
    .group-description input[type="text"],
    .locked-description {
        min-width: 150px !important;
        width: 100% !important;
    }
}

@media all and (max-width: 575px) {
    #bo_w .list-group-item {
        padding-left: 1.0rem;
        padding-right: 1.0rem;
    }

    .responsive #bo_w #wr_content {
        max-height: 160px !important;
    }

    /* 모바일에서 가로 배치 유지 */
    #bo_w .form-group.row {
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    #bo_w .col-form-label {
        width: 30%;
        padding-right: 10px;
    }

    #bo_w .col-md-10 {
        width: 70%;
        flex: none;
    }
}

/* ===================================
 * 출처 영역
 * =================================== */
.store-info h3,
.group-type-title,
.source-info .section-title {
    padding: 15px;
    margin: 0 0 20px;
    background: #f8f9fa;
    border-left: 4px solid #4a90e2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.source-info {
    margin-bottom: 30px;
}

.source-info .form-inline-wrap {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 0 15px;
}

@media (max-width: 768px) {
    .source-info .form-inline-wrap {
        flex-direction: column;
        gap: 0px;
    }
    
    .source-info .form-group {
        width: 100%;
    }
    
    .source-info .form-control {
        width: 100% !important;
    }
}