/* ------------------------------------------------------------
 * REVIEW MODAL STYLING
 * ------------------------------------------------------------ */

/* Modal Overlay */
.review-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Modal Content */
.review-modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    padding: 32px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.3s 0.1s forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close Button */
.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    padding: 4px;
}

.close-modal-btn:hover {
    color: #111;
}

.review-form-title {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 20px;
    font-weight: 500;
    text-align: center;
    color: #111;
    border: none;
    padding: 0;
    letter-spacing: -0.01em;
}

/* Form Groups */
.review-form-group {
    margin-bottom: 24px;
}

.review-form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    text-transform: none;
    letter-spacing: normal;
}

.review-form-label .required {
    color: #ef4444;
}

/* Star Rating Input (Centered for modal) */
.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 8px;
}

.hidden-radio {
    display: none;
}

.star-label {
    cursor: pointer;
    transition: transform 0.1s ease;
    line-height: 1;
    display: block;
}

.star-label svg {
    width: 28px;
    height: 28px;
    fill: #E0E0E0;
    stroke: none;
    transition: fill 0.2s ease;
}

.star-label:hover {
    transform: scale(1.1);
}

.star-label:hover svg,
.star-label:hover~.star-label svg,
input.hidden-radio:checked~.star-label svg {
    fill: #FFC107;
}

/* Textarea */
.review-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    color: #111;
    background: #fafafa;
    resize: none;
    transition: all 0.2s;
    min-height: 100px;
}

.review-textarea:focus {
    background: #fff;
    border-color: #111;
    box-shadow: 0 0 0 1px #111;
    outline: none;
}

/* Hide Cookie Consent Label */
.comment-form-cookies-consent {
    display: none !important;
}

/* File Upload */
.file-upload-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.custom-file-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px dashed #ccc;
    border-radius: 8px;
    background: #fafafa;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.custom-file-upload:hover {
    border-color: #111;
    color: #111;
    background: #fff;
}

.image-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.image-preview-item {
    width: 70px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    border: 1px solid #eee;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-preview-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.remove-preview-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.preview-item {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    border: 1px solid #eee;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Review Images Display in Row */
.review-images {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.review-images::-webkit-scrollbar {
    height: 4px;
}

.review-images::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.review-images::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.review-images::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.review-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.review-image:hover {
    transform: scale(1.05);
    border-color: #111;
}

/* Submit Button */
.submit-review-btn {
    width: 100%;
    padding: 14px;
    background-color: #111;
    color: white;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 8px;
}

.submit-review-btn:hover {
    background-color: #333;
}

/* Button Loading Spinner */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

.btn-loading .btn-text {
    visibility: hidden;
}


/* Review Action Icons */
.review-action-icons {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #71717a;
    transition: all 0.2s;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: #f4f4f5;
    color: #111;
}

.edit-review-btn:hover {
    color: #3b82f6;
}

.delete-review-btn:hover {
    color: #ef4444;
}


/* Load More Button */
.load-more-btn {
    background: transparent;
    border: 1px solid #e4e4e7;
    color: #18181b;
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.load-more-btn:hover {
    background: #f4f4f5;
    border-color: #d4d4d8;
}

.load-more-btn svg {
    transition: transform 0.2s;
}

.load-more-btn:hover svg {
    transform: translateY(2px);
}
