/* Review Write Page Styles */

/* header.css의 #contents { padding: 50px 0 } 덮어쓰기 */
#contents:has(.review-write-page) { 
    padding-top: 0 !important; 
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.review-write-page {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Breadcrumb & Heading (list.skin.php와 동일한 스타일) */
.review-write-page .jjdd-board-top { 
    max-width: 1440px; 
    margin: -30px auto 44px; 
    padding: 0 70px; 
    box-sizing: border-box;
    width: 100%;
}

.jjdd-board-breadcrumb {
    display: flex; 
    justify-content: flex-end; 
    align-items: center; 
    gap: 12px;
    margin-top: 4px; 
    margin-bottom: 22px; 
    font-size: 14px; 
    color: #9b9b9b;
}

.jjdd-board-breadcrumb a {
    color: #7b7b7b;
    text-decoration: none;
}

.jjdd-board-breadcrumb a:hover {
    color: #0e0e0e;
    text-decoration: none;
}

.jjdd-board-breadcrumb span {
    margin: 0;
}

.jjdd-board-breadcrumb strong {
    color: #0e0e0e;
    font-weight: 600;
}

.jjdd-board-heading {
    text-align: center;
}

.jjdd-board-heading h2 {
    font-size: 32px;
    font-weight: 700;
    color: #000;
    margin: 40px 0 30px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Main Container */
.review-write-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 50px 60px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

@media (min-width: 768px) {
    .review-write-container {
        margin-left: 20px;
        margin-right: 20px;
    }
}

@media (min-width: 940px) {
    .review-write-container {
        margin-left: auto;
        margin-right: auto;
    }
}

/* Field Row */
.rw-field {
    display: flex;
    margin-bottom: 30px;
    align-items: flex-start;
}

.rw-field-label {
    flex: 0 0 150px;
    padding-top: 12px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.rw-field-label label {
    display: block;
    margin-bottom: 8px;
}

.rw-field-value {
    flex: 1;
}

/* Input Fields */
.rw-input-text {
    width: 100%;
    height: 46px;
    padding: 0 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.rw-input-text:focus {
    outline: none;
    border-color: #9f4ff0;
}

.rw-textarea {
    width: 100%;
    height: 300px;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
    transition: border-color 0.2s;
}

.rw-textarea:focus {
    outline: none;
    border-color: #9f4ff0;
}

.rw-word-count {
    margin-top: 8px;
    font-size: 12px;
    color: #999;
    text-align: right;
}

/* Buttons in Label */
.rw-select-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

/* File Controls */
.rw-file-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rw-file-btn {
    display: inline-block;
    padding: 6px 16px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.rw-select-btn:hover,
.rw-file-btn:hover {
    background: #eaeaea;
    border-color: #bbb;
}

.rw-file-desc {
    font-size: 13px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Selected Product Display */
.selected-product-display {
    min-height: 80px;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
    display: flex;
    align-items: center;
    gap: 16px;
}

.selected-product-display img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.selected-product-display span {
    font-size: 14px;
    color: #333;
}

/* Rating Stars */
.rw-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 8px;
}

.rw-rating input[type="radio"] {
    display: none;
}

.rw-rating label {
    font-size: 36px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.rw-rating input[type="radio"]:checked ~ label,
.rw-rating label:hover,
.rw-rating label:hover ~ label {
    color: #ffb400;
}

/* Bottom Buttons */
.rw-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #e5e5e5;
}

.rw-btn {
    min-width: 120px;
    height: 48px;
    padding: 0 32px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.rw-btn-cancel {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.rw-btn-cancel:hover {
    background: #eaeaea;
    border-color: #bbb;
}

.rw-btn-submit {
    background: #9f4ff0;
    color: #fff;
}

.rw-btn-submit:hover {
    background: #8a3ed6;
}

/* Product Selection Modal */
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.product-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 80%;
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    overflow-y: auto;
}

.product-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: #fff;
    border: 2px solid #000;
    border-radius: 50%;
    font-size: 24px;
    line-height: 32px;
    cursor: pointer;
    transition: background 0.2s;
}

.product-modal-close:hover {
    background: #f5f5f5;
}

.product-modal h3 {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin: 0 0 30px 0;
}

.product-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.product-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.product-item:hover {
    border-color: #9f4ff0;
    background: #fafafa;
}

.product-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
}

.product-item span {
    font-size: 13px;
    color: #333;
    text-align: center;
    line-height: 1.4;
}

/* File Info */
.file-info {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

/* File Field Divider */
.rw-field-divider {
    height: 1px;
    background: #e5e5e5;
    margin: 20px 0;
}

/* No Order Message */
.no-order-msg {
    text-align: center;
    padding: 60px 20px;
    font-size: 15px;
    color: #999;
    margin: 0;
}

/* Responsive */
@media (max-width: 767px) {
    .review-write-page .jjdd-board-top {
        padding: 0 20px;
        margin: -30px auto 30px;
    }
    
    .jjdd-board-breadcrumb { 
        justify-content: flex-start; 
        margin-bottom: 18px; 
        gap: 8px; 
        font-size: 13px;
    }
    
    .jjdd-board-heading h2 { 
        font-size: 24px !important; 
        text-align: left;
        margin: 30px 0 20px !important;
    }
    
    .review-write-container {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .rw-field {
        flex-direction: column;
    }
    
    .rw-field-label {
        flex: none;
        padding-top: 0;
        margin-bottom: 10px;
    }
    
    .rw-file-controls {
        flex-wrap: wrap;
    }
    
    .rw-file-desc {
        width: 100%;
        margin-top: 8px;
    }
    
    .product-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .rw-buttons {
        flex-wrap: wrap;
    }
}
