/* Review Form Styling - Clean White & Golden Design */

.review-section {
    background-color: #ffffff;
    padding: 60px 0;
}

.review-form-card {
    background: linear-gradient(145deg, #ffffff, #fafafa);
    border: 2px solid #977143;
    border-radius: 16px;
    box-shadow: 0 6px 22px rgba(151, 113, 67, 0.2);
    overflow: hidden;
    position: relative;
    transition: all 0.4s ease-in-out;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s ease forwards;
    animation-delay: 0.2s;
}

/* Glow effect on hover */
.review-form-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.review-form-card:hover::before {
    opacity: 1;
}

.review-form-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 10px 30px rgba(151, 113, 67, 0.4);
    border-color: #b8854d;
}

.review-form-header {
    background: linear-gradient(145deg, #ffffff, #fafafa);
    color: #977143;
    padding: 20px 25px;
    border-bottom: 2px solid #977143;
}

.review-form-header h4 {
    margin: 0;
    font-weight: 700;
    color: #977143;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.review-form-header p {
    margin: 5px 0 0 0;
    color: #555555;
    font-size: 14px;
    opacity: 0.9;
}

.review-form-body {
    padding: 30px;
    background: linear-gradient(145deg, #ffffff, #fafafa);
}

/* Simple Star Rating */
.rating-container {
    margin-bottom: 25px;
}

.rating-stars {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

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

.star-label {
    font-size: 24px;
    color: #e9ecef;
    cursor: pointer;
    transition: color 0.2s ease;
    user-select: none;
}

.star-label::before {
    content: "★";
}

.star-label:hover,
.star-label.active {
    color: #ffc107;
}

.rating-stars input[type="radio"]:checked+.star-label {
    color: #ffc107;
}

.rating-text {
    color: #6c757d;
    font-size: 14px;
    min-height: 20px;
}

/* Comment Section */
.comment-section {
    margin-bottom: 25px;
}

.comment-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #343a40;
}

.comment-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.comment-textarea:focus {
    outline: none;
    border-color: #343a40;
    box-shadow: 0 0 0 2px rgba(52, 58, 64, 0.1);
}

.character-count {
    text-align: right;
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

/* Image Upload */
.image-upload-section {
    margin-bottom: 25px;
}

.image-upload-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #343a40;
}

.image-upload-area {
    border: 2px dashed #ced4da;
    border-radius: 4px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.image-upload-area:hover {
    border-color: #343a40;
    background-color: #f8f9fa;
}

.upload-placeholder {
    color: #6c757d;
}

.upload-placeholder div {
    font-size: 32px;
    margin-bottom: 10px;
    color: #343a40;
}

.upload-placeholder p {
    margin: 8px 0 4px 0;
    font-weight: 500;
    color: #343a40;
}

.upload-placeholder small {
    color: #6c757d;
}

#id_image {
    display: none;
}

.image-preview {
    position: relative;
    display: inline-block;
}

.preview-img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #dc3545;
    color: #977143;
    border: none;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-image:hover {
    background: #c82333;
}

/* Submit Button */
.btn-submit {
    background: #343a40;
    color: #977143;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-submit:hover {
    background: #23272b;
}

.btn-submit:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Review Display */
.reviews-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.reviews-header h4 {
    color: #343a40;
    font-weight: 600;
    margin: 0;
}

.review-stats {
    color: #6c757d;
    font-size: 14px;
    margin-top: 5px;
}

.review-card {
    background: linear-gradient(145deg, #ffffff, #fafafa);
    border: 2px solid #977143;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 6px 22px rgba(151, 113, 67, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease-in-out;
}

/* Glow effect on hover */
.review-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.review-card:hover::before {
    opacity: 1;
}

.review-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(151, 113, 67, 0.4);
    border-color: #b8854d;
}

.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.reviewer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #977143;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 15px;
}

.reviewer-info h6 {
    margin: 0 0 5px 0;
    color: #977143;
    font-weight: 700;
}

.review-rating {
    color: #ffc107;
    font-size: 14px;
    margin-bottom: 3px;
}

.review-rating .star {
    color: #ffc107;
}

.review-rating .star::before {
    content: "★";
}

.review-rating .star-empty {
    color: #e9ecef;
}

.review-rating .star-empty::before {
    content: "☆";
}

.review-date {
    color: #6c757d;
    font-size: 12px;
}

.review-content {
    color: #555555;
    line-height: 1.6;
    margin-bottom: 15px;
    opacity: 0.9;
}

.review-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.review-image:hover {
    opacity: 0.8;
}

/* Empty State */
.empty-reviews {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(145deg, #ffffff, #fafafa);
    border: 2px solid #977143;
    border-radius: 16px;
    color: #555555;
    box-shadow: 0 6px 22px rgba(151, 113, 67, 0.2);
}

.empty-reviews h5 {
    color: #977143;
    margin-bottom: 10px;
    font-weight: 700;
}

.btn-outline {
    background: transparent;
    color: #343a40;
    border: 1px solid #343a40;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: #343a40;
    color: #977143;
    text-decoration: none;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.image-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #977143;
    font-size: 28px;
    cursor: pointer;
    font-weight: bold;
}

.close-modal:hover {
    color: #ccc;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {

    .review-form-header,
    .review-form-body {
        padding: 20px;
    }

    .star-label {
        font-size: 20px;
    }

    .review-card {
        padding: 20px;
    }

    .reviewer-avatar {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .empty-reviews {
        padding: 40px 20px;
    }
}