/* 리뷰 게시판 전용 스타일 */

/* 컨테이너 */
.review-container {
    max-width: 1200px;
    margin: 100px auto;
    padding: 20px;
}

/* 헤더 */
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.review-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.btn-write {
    background-color: #3b82f6;
    color: white;
    padding: 10px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.btn-write:hover {
    background-color: #2563eb;
}

/* 통계 섹션 */
.review-stats {
    display: flex;
    gap: 15px;
    background-color: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #e5e7eb;
}

.stats-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 12px 18px;
    border-radius: 6px;
    flex: 1;
    border: 1px solid #e5e7eb;
}

.stats-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.stats-value {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
}

/* 인기 태그 섹션 */
.popular-tags {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #e5e7eb;
}

.popular-tags h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #374151;
    font-weight: 600;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item {
    background-color: #e5e7eb;
    color: #4b5563;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
}

/* 리뷰 목록 */
.review-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 리뷰 카드 */
.review-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.2s ease;
}

.review-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-name {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.review-stars {
    font-size: 18px;
    color: #ffd700;
    letter-spacing: 2px;
    display: inline-flex;
    gap: 2px;
}

/* 별점 표시 스타일 */
.star-display {
    display: inline-flex;
    gap: 2px;
}

.star-item-display {
    position: relative;
    display: inline-block;
    width: 1em;
    height: 1em;
}

.star-bg-display {
    position: absolute;
    top: 0;
    left: 0;
    color: #ddd;
}

.star-fill-display {
    position: absolute;
    top: 0;
    left: 0;
    color: #ffd700;
    overflow: hidden;
    white-space: nowrap;
}

.review-date {
    font-size: 13px;
    color: #9ca3af;
}

.review-actions {
    display: flex;
    gap: 8px;
}

.btn-edit,
.btn-delete {
    padding: 6px 12px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.btn-edit {
    background-color: #3b82f6;
    color: white;
}

.btn-edit:hover {
    background-color: #2563eb;
}

.btn-delete {
    background-color: #ef4444;
    color: white;
}

.btn-delete:hover {
    background-color: #dc2626;
}

/* 리뷰 태그 */
.review-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.review-tag {
    background-color: #dbeafe;
    color: #1e40af;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* 리뷰 내용 */
.review-content {
    font-size: 14px;
    line-height: 1.8;
    color: #374151;
    white-space: pre-line;
    background-color: #f9fafb;
    padding: 16px;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
    margin-top: 8px;
}

/* 빈 목록 */
.review-empty {
    text-align: center;
    padding: 60px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.review-empty p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

/* 페이징 */
.review-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 40px;
    padding: 20px 0;
}

.review-pagination a,
.review-pagination strong {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    transition: all 0.2s ease;
    background: white;
    min-width: 36px;
    text-align: center;
}

.review-pagination a:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.page-current {
    background-color: #3b82f6;
    color: white !important;
    border-color: #3b82f6;
}

/* 작성 폼 스타일 */
.form-section {
    margin-bottom: 30px;
}

/* 별점 선택 UI - 드래그 가능 */
.star-rating-drag {
    display: inline-flex;
    gap: 5px;
    font-size: 50px;
    margin: 20px 0;
    user-select: none;
    cursor: pointer;
    width: fit-content;
}

.star-item {
    position: relative;
    display: inline-block;
    width: 1em;
    height: 1em;
}

.star-bg {
    position: absolute;
    top: 0;
    left: 0;
    color: #ddd;
    pointer-events: none;
}

.star-fill {
    position: absolute;
    top: 0;
    left: 0;
    color: #ffd700;
    overflow: hidden;
    white-space: nowrap;
    pointer-events: none;
    transition: width 0.1s ease, opacity 0.2s ease;
}

.form-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.required {
    color: #f44336;
    font-size: 14px;
    font-weight: normal;
}

/* 태그 체크박스 */
.tag-checkbox-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 10px;
}

.tag-checkbox {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.tag-checkbox:hover {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

.tag-checkbox.checked {
    border-color: #3b82f6;
    background-color: #3b82f6;
    color: white;
}

.tag-checkbox.checked .checkbox-label {
    color: white;
}

.tag-checkbox input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

/* 텍스트 에리어 */
.form-textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

.form-textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

.form-help {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
}

/* 버튼 섹션 */
.form-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
}

.btn-cancel,
.btn-submit {
    padding: 12px 32px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-cancel {
    background-color: #6b7280;
    color: white;
}

.btn-cancel:hover {
    background-color: #4b5563;
}

.btn-submit {
    background-color: #3b82f6;
    color: white;
}

.btn-submit:hover {
    background-color: #2563eb;
}

/* 이미지 업로드 */
.image-upload-area {
    margin-bottom: 15px;
}

.btn-upload {
    background-color: #f3f4f6;
    color: #374151;
    padding: 12px 24px;
    border: 2px dashed #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-upload:hover {
    background-color: #e5e7eb;
    border-color: #3b82f6;
}

/* 이미지 미리보기 */
.image-preview-area {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.image-preview-item {
    position: relative;
    width: 100%;
    padding-top: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.image-preview-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-remove-image {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background-color: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.btn-remove-image:hover {
    background-color: rgba(220, 38, 38, 1);
}

/* 리뷰 이미지 갤러리 */
.review-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-bottom: 15px;
}

.review-image-item {
    position: relative;
    width: 100%;
    padding-top: 100%;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
}

.review-image-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.review-image-item:hover img {
    transform: scale(1.05);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .review-container {
        padding: 15px;
    }

    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .review-header h2 {
        font-size: 24px;
    }

    .review-stats {
        flex-direction: column;
        gap: 15px;
    }

    .tag-checkbox-list {
        grid-template-columns: 1fr;
    }

    .review-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .review-author {
        flex-wrap: wrap;
    }

    .review-pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .review-header h2 {
        font-size: 20px;
    }

    .btn-write {
        width: 100%;
        text-align: center;
    }

    .form-buttons {
        flex-direction: column;
    }

    .btn-cancel,
    .btn-submit {
        width: 100%;
    }
}
