/* BMB Product Reviews Styles */

/* Review Button */
.bmb-review-button-container {
    margin: 30px 0;
    text-align: left;
}

.bmb-add-review-btn {
    background: #472ca8;
    color: #ffffff;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-family: "Barlow", sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 14px;
}

.bmb-add-review-btn:hover {
    background: #3d8a7a;
}

/* Modal Styles */
.bmb-review-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bmb-review-modal.bmb-modal-open {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.bmb-modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 12px;
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.bmb-modal-open .bmb-modal-content {
    transform: scale(1);
}

/* Modal Header */
.bmb-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
}

.bmb-modal-header h3 {
    margin: 0;
    font-family: "Barlow", sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #333;
}

.bmb-back-arrow,
.bmb-close {
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    color: #666;
    transition: color 0.3s ease;
}

.bmb-back-arrow:hover,
.bmb-close:hover {
    color: #333;
}

/* Modal Body */
.bmb-modal-body {
    padding: 30px;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
}

/* Product Info */
.bmb-product-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.bmb-product-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.bmb-product-name {
    font-family: "Barlow", sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* Rating Section */
.bmb-rating-section {
    margin-bottom: 25px;
}

.bmb-rating-section label {
    display: block;
    margin-bottom: 10px;
    font-family: "Barlow", sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.bmb-star-rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

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

.bmb-star.selected,
.bmb-star.hover {
    color: #ffc107;
}

.bmb-rating-text {
    margin-left: 15px;
    font-family: "Barlow", sans-serif;
    font-size: 14px;
    color: #666;
}

/* Review Text */
.bmb-review-text {
    margin-bottom: 25px;
}

.bmb-review-text textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-family: "Barlow", sans-serif;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.bmb-review-text textarea:focus {
    outline: none;
    border-color: #472ca8;
}

.bmb-review-text textarea::placeholder {
    color: #999;
}

/* User Info */
.bmb-user-info {
    margin-bottom: 25px;
}

.bmb-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.bmb-form-field label {
    display: block;
    margin-bottom: 8px;
    font-family: "Barlow", sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.bmb-form-field input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-family: "Barlow", sans-serif;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.bmb-form-field input:focus {
    outline: none;
    border-color: #472ca8;
}

/* Media Upload */
.bmb-media-upload {
    margin-bottom: 30px;
    padding: 20px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    text-align: center;
}

.bmb-upload-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.bmb-upload-btn {
    width: 50px;
    height: 50px;
    background: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.bmb-upload-btn:hover {
    background: #e8e8e8;
}

.bmb-upload-btn svg {
    width: 24px;
    height: 24px;
    color: #666;
}

.bmb-upload-text {
    font-family: "Barlow", sans-serif;
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

/* Form Actions */
.bmb-form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
}

.bmb-submit-btn,
.bmb-cancel-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-family: "Barlow", sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.bmb-submit-btn {
    background: #472ca8;
    color: #ffffff;
}

.bmb-submit-btn:hover:not(:disabled) {
    background: #3a2186;
}

.bmb-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.bmb-cancel-btn {
    background: #472ca8;
    color: #ffffff;
}

.bmb-cancel-btn:hover {
    background: #3a2186;
    background: #e8e8e8;
}

/* Review Statistics */
.bmb-review-statistics {
    margin: 40px 0;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 12px;
}

.bmb-stats-summary {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: center;
}

.bmb-average-rating {
    text-align: center;
}

.bmb-rating-number {
    display: block;
    font-size: 48px;
    font-weight: 300;
    color: #333;
    font-family: "Barlow", sans-serif;
}

.bmb-rating-stars {
    margin: 10px 0;
}

.bmb-rating-stars .bmb-star {
    font-size: 20px;
    color: #ddd;
}

.bmb-rating-stars .bmb-star.filled {
    color: #ffc107;
}

.bmb-average-rating p {
    margin: 10px 0 0 0;
    font-family: "Barlow", sans-serif;
    font-size: 14px;
    color: #666;
}

.bmb-rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bmb-rating-bar {
    display: grid;
    grid-template-columns: 50px 1fr 40px;
    gap: 15px;
    align-items: center;
    font-family: "Barlow", sans-serif;
    font-size: 14px;
    color: #666;
}

.bmb-bar-container {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.bmb-bar-fill {
    height: 100%;
    background: #ffc107;
    transition: width 0.3s ease;
}

/* Body lock when modal is open */
.bmb-modal-active {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bmb-modal-content {
        width: 95%;
        margin: 20px;
    }

    .bmb-modal-body {
        padding: 20px;
    }

    .bmb-form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .bmb-form-actions {
        grid-template-columns: 1fr;
    }

    .bmb-stats-summary {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .bmb-upload-buttons {
        flex-direction: column;
    }
}