/* =====================================================
   Review Plugin - Frontend Styles
   ===================================================== */

/* 리뷰 폼 컨테이너 */
.review-form-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.review-form-container h2 {
    display: none;
}

/* 폼 레이아웃 */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
}

.form-group {
    flex: 1;
    width: 100%;
}

.form-group.full-width {
    width: 100%;
    margin-bottom: 20px;
}

/* 폼 요소 기본 스타일 */
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group label i {
    margin-right: 5px;
    color: #666;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
    min-height: 200px;
}

.form-group select {
    background: #f9f9f9;
    cursor: pointer;
    appearance: auto;
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
}

/* 지역 선택 */
.location-selects {
    display: flex;
    gap: 10px;
}

.location-selects select {
    flex: 1;
    min-width: 0;
}

/* =====================================================
   이미지 업로드 영역
   ===================================================== */

.rp-image-upload-container {
    display: -webkit-box !important;
    display: -ms-flexbox !important;
    display: flex !important;
    gap: 15px !important;
    -ms-flex-wrap: wrap !important;
    flex-wrap: wrap !important;
    margin-top: 10px !important;
}

.rp-upload-box {
    width: 150px !important;
    height: 150px !important;
    min-width: 150px !important;
    min-height: 150px !important;
    max-width: 150px !important;
    max-height: 150px !important;
    position: relative !important;
    border: 2px dashed #ddd !important;
    border-radius: 8px !important;
    background-color: #fafafa !important;
    cursor: pointer !important;
    overflow: hidden !important;
    -webkit-box-sizing: border-box !important;
    box-sizing: border-box !important;
}

.rp-upload-box:hover {
    border-color: #72562b !important;
    background-color: #faf8f5 !important;
}

/* 파일 input - 완전히 숨김 */
.rp-file-input {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    position: absolute !important;
    z-index: -9999 !important;
}

/* 업로드 라벨 */
.rp-upload-label {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: -webkit-box !important;
    display: -ms-flexbox !important;
    display: flex !important;
    -webkit-box-orient: vertical !important;
    -webkit-box-direction: normal !important;
    -ms-flex-direction: column !important;
    flex-direction: column !important;
    -webkit-box-align: center !important;
    -ms-flex-align: center !important;
    align-items: center !important;
    -webkit-box-pack: center !important;
    -ms-flex-pack: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 1 !important;
}

.rp-upload-label i {
    font-size: 48px !important;
    color: #aaa !important;
    margin-bottom: 8px !important;
    display: block !important;
}

.rp-upload-label span {
    font-size: 13px !important;
    color: #666 !important;
    display: block !important;
    text-align: center !important;
    line-height: 1.2 !important;
    font-weight: normal !important;
}

.rp-upload-box:hover .rp-upload-label i {
    color: #72562b !important;
}

/* 미리보기 영역 */
.rp-preview-area {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: #fff !important;
    z-index: 2 !important;
    display: none !important;
}

.rp-preview-area img {
    width: 100% !important;
    height: 100% !important;
    -o-object-fit: cover !important;
    object-fit: cover !important;
    display: block !important;
}

/* 미리보기 있을 때 */
.rp-upload-box.rp-has-preview .rp-preview-area {
    display: block !important;
}

.rp-upload-box.rp-has-preview .rp-upload-label {
    display: none !important;
}

.rp-upload-box.rp-has-preview {
    border-color: #72562b !important;
    border-style: solid !important;
}

/* 삭제 버튼 */
.rp-btn-remove {
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    width: 24px !important;
    height: 24px !important;
    background-color: rgba(0, 0, 0, 0.7) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 50% !important;
    font-size: 14px !important;
    font-weight: normal !important;
    line-height: 24px !important;
    text-align: center !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    z-index: 20 !important;
    display: none !important;
    -webkit-transition: all 0.2s ease !important;
    -o-transition: all 0.2s ease !important;
    transition: all 0.2s ease !important;
    opacity: 0.8 !important;
}

.rp-upload-box.rp-has-preview .rp-btn-remove {
    display: -webkit-box !important;
    display: -ms-flexbox !important;
    display: flex !important;
    -webkit-box-align: center !important;
    -ms-flex-align: center !important;
    align-items: center !important;
    -webkit-box-pack: center !important;
    -ms-flex-pack: center !important;
    justify-content: center !important;
}

.rp-btn-remove:hover {
    background-color: rgba(0, 0, 0, 0.9) !important;
    opacity: 1 !important;
    -webkit-transform: scale(1.15) !important;
    -ms-transform: scale(1.15) !important;
    transform: scale(1.15) !important;
}

/* =====================================================
   체크박스
   ===================================================== */

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-group label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
    flex: 1;
}

.checkbox-group a {
    color: #666;
    text-decoration: none;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

/* =====================================================
   개인정보 동의 팝업
   ===================================================== */

.rp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.rp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
}

.rp-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: white;
    border-radius: 8px;
    z-index: 10002;
    display: flex;
    flex-direction: column;
}

.rp-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rp-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
    font-weight: 600;
}

.rp-modal-close {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.rp-modal-close:hover {
    color: #333;
}

.rp-modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.rp-modal-body h4 {
    font-size: 16px;
    color: #72562b;
    margin: 20px 0 10px 0;
    font-weight: 600;
}

.rp-modal-body h4:first-child {
    margin-top: 0;
}

.rp-modal-body p {
    margin: 8px 0;
    line-height: 1.6;
    color: #555;
    font-size: 14px;
}

.rp-modal-body ul {
    margin: 10px 0;
    padding-left: 20px;
}

.rp-modal-body li {
    margin: 5px 0;
    line-height: 1.6;
    color: #555;
    font-size: 14px;
}

.rp-modal-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.rp-modal-footer p {
    color: #72562b;
    font-weight: 600;
}

.rp-modal-actions {
    padding: 15px 25px;
    border-top: 1px solid #eee;
    text-align: center;
}

.rp-btn-modal-confirm {
    padding: 12px 40px;
    background: #72562b;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.rp-btn-modal-confirm:hover {
    background: #5d4522;
}

/* =====================================================
   버튼
   ===================================================== */

.form-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.btn-cancel,
.btn-submit {
    padding: 12px 40px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-cancel i,
.btn-submit i {
    font-size: 14px;
}

.btn-cancel {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
}

.btn-cancel:hover {
    background: #f5f5f5;
}

.btn-submit {
    background: #72562b;
    color: white;
}

.btn-submit:hover {
    background: #5d4522;
}

/* =====================================================
   메시지
   ===================================================== */

#review-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    display: none;
}

#review-message.success {
    background: #f4f1ed;
    color: #72562b;
    border: 1px solid #d4cdc3;
    display: block;
}

#review-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* =====================================================
   베스트 리뷰 섹션
   ===================================================== */

.best-review-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 20px;
    background: #f8f5f0;
}

.best-review-title {
    font-size: 48px;
    font-weight: 300;
    text-align: center;
    margin-bottom: 10px;
    color: #333;
    font-family: Georgia, serif;
}

.best-review-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 50px;
    font-size: 16px;
}

.best-review-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.best-review-card {
    background: white;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.best-review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.best-review-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(114, 86, 43, 0.9);
    color: white;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10;
}

.best-review-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #f0f0f0;
}

.best-review-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.best-review-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 64px;
}

.best-review-card:hover .best-review-image img {
    transform: scale(1.05);
}

.best-review-content {
    padding: 30px 25px;
}

.best-review-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
    min-height: 50px;
}

.best-review-text {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 14px;
    min-height: 60px;
}

.best-review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.best-review-rating {
    color: #ffd700;
    font-size: 16px;
}

.best-review-rating i {
    margin-right: 2px;
}

.best-review-rating .far {
    color: #ddd;
}

.best-review-author {
    color: #999;
    font-size: 14px;
}

/* =====================================================
   리뷰 전체 목록 스타일 (새로 추가)
   ===================================================== */

.rp-review-list-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.rp-review-item {
    display: flex;
    gap: 20px;
    padding: 30px 0;
    border-bottom: 1px solid #e5e5e5;
}

.rp-review-item:first-child {
    padding-top: 0;
}

.rp-review-item:last-child {
    border-bottom: none;
}

/* 이미지 영역 */
.rp-review-image-wrapper {
    position: relative;
    flex-shrink: 0;
    width: 180px;
    height: 180px;
}

.rp-review-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.rp-review-no-image {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.rp-review-no-image i {
    font-size: 48px;
    color: #ddd;
}

.rp-review-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(114, 86, 43, 0.9);
    color: white;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 2px;
}

/* 컨텐츠 영역 */
.rp-review-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.rp-review-item-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.rp-review-item-content {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
    font-size: 15px;
}

/* 메타 정보 */
.rp-review-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.rp-review-rating {
    color: #ffd700;
    font-size: 16px;
}

.rp-review-rating i {
    margin-right: 2px;
}

.rp-review-rating .far {
    color: #ddd;
}

.rp-review-info {
    display: flex;
    gap: 15px;
    color: #999;
    font-size: 14px;
}

.rp-review-date::before {
    content: '|';
    margin-right: 15px;
    color: #ddd;
}

.rp-review-location {
    color: #666;
    font-size: 14px;
}

.rp-review-location span {
    font-weight: 600;
    color: #72562b;
}

/* =====================================================
   페이지네이션
   ===================================================== */

.rp-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 50px;
    padding: 20px 0;
}

.rp-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    color: #666;
    text-decoration: none;
    border: 1px solid #e5e5e5;
    background: white;
    transition: all 0.3s;
    font-size: 14px;
}

.rp-page-link:hover {
    background: #f8f5f0;
    border-color: #72562b;
    color: #72562b;
}

.rp-page-link.rp-page-active {
    background: #72562b;
    border-color: #72562b;
    color: white;
    font-weight: 600;
    pointer-events: none;
}

.rp-page-prev,
.rp-page-next,
.rp-page-last {
    font-weight: 600;
}

/* 리뷰 없을 때 */
.rp-no-reviews {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.rp-no-reviews p {
    font-size: 16px;
    margin: 0;
}

/* =====================================================
   반응형 (모바일)
   ===================================================== */

@media (max-width: 1024px) {
    .best-review-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    .rp-image-upload-container {
        flex-wrap: wrap;
    }
    
    .location-selects {
        flex-direction: row;
    }
    
    .best-review-title {
        font-size: 36px;
    }
    
    .best-review-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .best-review-section {
        padding: 40px 15px;
    }
    
    /* 리뷰 목록 모바일 */
    .rp-review-item {
        flex-direction: column;
        padding: 20px 0;
    }
    
    .rp-review-image-wrapper {
        width: 100%;
        height: 250px;
    }
    
    .rp-review-item-title {
        font-size: 18px;
    }
    
    .rp-review-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .rp-review-date::before {
        content: '';
        margin-right: 0;
    }
    
    .rp-pagination {
        gap: 3px;
        flex-wrap: wrap;
    }
    
    .rp-page-link {
        min-width: 35px;
        height: 35px;
        font-size: 13px;
    }
}