/* Modal overlay */
#wcsr-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

/* Modal content box */
#wcsr-modal .wcsr-modal-content {
    background-color: #fff;
    margin: 8% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
}

/* Modal heading */
#wcsr-modal h3 {
    margin-top: 0;
    font-size: 1.6em;
}

/* Stars */
#wcsr-modal .stars {
    margin: 15px 0;
}

#wcsr-modal .stars label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#wcsr-modal .star {
    font-size: 2em;
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s;
    margin-right: 5px;
}

#wcsr-modal .star.hover,
#wcsr-modal .star.selected {
    color: #f5b301;
}

/* Form elements */
#wcsr-review-form select,
#wcsr-review-form textarea {
    width: 100%;
    margin: 10px 0;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1em;
}

#wcsr-review-form button {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-size: 1em;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

#wcsr-review-form button:hover {
    background-color: #005177;
}

/* Textarea */
#wcsr-review-form textarea {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    border-radius: 8px;
    border: 1px solid #ccc;
    margin-bottom: 20px;
    height: 120px;
    resize: none;
    color: #333;
    background-color: #f9f9f9;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

#wcsr-review-form textarea:focus {
    border-color: #0073aa;
    outline: none;
}

/* Image Upload Section */
.wcsr-image-upload {
    margin-bottom: 20px;
}

.wcsr-image-upload label {
    font-weight: bold;
    color: #333;
    display: block;
    margin-bottom: 8px;
}

.wcsr-image-upload input[type="file"] {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    border-radius: 6px;
    border: 1px solid #ccc;
    background-color: #f7f7f7;
    margin-bottom: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wcsr-image-upload input[type="file"]:hover {
    background-color: #f1f1f1;
}

/* Image Preview Section */
.wcsr-image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

/* Single image preview container */
.wcsr-image-single {
    position: relative;
    width: 80px;
    height: 80px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

/* Image inside preview */
.wcsr-image-single img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wcsr-image-single:hover img {
    transform: scale(1.1);
}

/* Remove image button (cross) */
.wcsr-remove-image {
    position: absolute;
    top: -5px;
    right: -5px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    width: 18px;
    height: 18px;
    text-align: center;
    line-height: 18px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.wcsr-remove-image:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Submit Button */
#wcsr-review-form button {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

#wcsr-review-form button:hover {
    background-color: #005177;
}

/* Spinner for loading */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.wcsr-preview-img{
    position: relative;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    #wcsr-modal .wcsr-modal-content {
        padding: 20px;
        margin: 15% auto;
    }
    #wcsr-review-form button {
        width: 100%;
    }
}
