/**
 * Public styles for Loox Reviews
 */

/* === Base Styles === */
.loox-reviews-container {
    margin: 40px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

/* === Stars === */
.loox-stars {
    display: inline-flex;
    gap: 2px;
    font-size: 18px;
    line-height: 1;
}

.loox-star {
    display: inline-block;
}

.loox-star-full {
    color: #FFB400;
}

.loox-star-half {
    color: #FFB400;
    position: relative;
    display: inline-block;
}

.loox-star-empty {
    color: #ddd;
}

/* === Reviews Summary === */
.loox-reviews-summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 40px;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 30px;
}

.loox-summary-main {
    display: flex;
    align-items: center;
    gap: 20px;
}

.loox-average-rating-big {
    font-size: 56px;
    font-weight: bold;
    line-height: 1;
    color: #333;
}

.loox-summary-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.loox-total-reviews {
    color: #666;
    font-size: 14px;
}

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

.loox-rating-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.loox-rating-label {
    min-width: 50px;
    font-size: 13px;
    color: #666;
}

.loox-rating-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.loox-rating-bar-fill {
    height: 100%;
    background-color: #FFB400;
    transition: width 0.3s ease;
}

.loox-rating-count {
    min-width: 40px;
    text-align: right;
    font-size: 13px;
    color: #666;
}

/* === Reviews List === */
.loox-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.loox-review-item {
    padding: 24px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: box-shadow 0.2s;
}

.loox-review-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.loox-review-header {
    margin-bottom: 16px;
}

.loox-reviewer-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.loox-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.loox-reviewer-details {
    flex: 1;
}

.loox-reviewer-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.loox-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #4CAF50;
    color: white;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
}

.loox-review-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.loox-review-date {
    color: #999;
}

.loox-review-content {
    margin-bottom: 16px;
}

.loox-review-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #333;
}

.loox-review-text {
    color: #555;
    line-height: 1.6;
    font-size: 14px;
}

/* === Review Media === */
.loox-review-media {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.loox-media-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
}

.loox-media-item img,
.loox-media-item video {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform 0.2s;
}

.loox-media-item:hover img,
.loox-media-item:hover video {
    transform: scale(1.05);
}

/* === Review Footer === */
.loox-review-footer {
    border-top: 1px solid #e0e0e0;
    padding-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.loox-review-helpful {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #666;
}

.loox-vote-button {
    border: 1px solid #ddd;
    background: white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.loox-vote-button:hover {
    border-color: #999;
    background: #f5f5f5;
}

.loox-vote-button.voted {
    background: #e8f5e9;
    border-color: #4CAF50;
    color: #4CAF50;
}

/* === Carousel Style === */
.loox-style-carousel {
    position: relative;
}

.loox-reviews-header {
    text-align: center;
    margin-bottom: 30px;
}

.loox-reviews-header h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
}

.loox-header-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.loox-carousel-wrapper {
    position: relative;
    padding: 0 50px;
}

.loox-carousel {
    overflow: hidden;
    border-radius: 8px;
}

.loox-carousel-track {
    display: flex;
    transition: transform 0.3s ease;
}

.loox-carousel-item {
    min-width: 100%;
    padding: 10px;
}

.loox-carousel-review {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
}

.loox-carousel-title {
    font-size: 18px;
    font-weight: 600;
    margin: 12px 0;
}

.loox-carousel-content {
    color: #555;
    line-height: 1.6;
    margin: 16px 0;
    min-height: 80px;
}

.loox-carousel-media {
    position: relative;
    margin: 16px 0;
}

.loox-carousel-media img {
    width: 100%;
    max-width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    margin: 0 auto;
}

.loox-photo-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.loox-carousel-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.loox-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.loox-verified-small {
    font-size: 11px;
    color: #4CAF50;
}

.loox-carousel-prev,
.loox-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}

.loox-carousel-prev:hover,
.loox-carousel-next:hover {
    background: #f5f5f5;
    border-color: #999;
}

.loox-carousel-prev {
    left: 0;
}

.loox-carousel-next {
    right: 0;
}

.loox-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.loox-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.loox-carousel-dot.active,
.loox-carousel-dot:hover {
    background: #FFB400;
}

/* === Review Form === */
.loox-review-form-wrapper {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    margin-top: 40px;
}

.loox-review-form-wrapper h3 {
    margin: 0 0 24px 0;
    font-size: 22px;
}

.loox-form-group {
    margin-bottom: 20px;
}

.loox-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.loox-form-group .required {
    color: #e74c3c;
}

.loox-form-group input[type="text"],
.loox-form-group input[type="email"],
.loox-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.loox-form-group input:focus,
.loox-form-group textarea:focus {
    outline: none;
    border-color: #FFB400;
}

.loox-form-group small {
    display: block;
    margin-top: 4px;
    color: #999;
    font-size: 12px;
}

/* Star Rating Input */
.loox-star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
}

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

.loox-star-label {
    font-size: 32px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

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

.loox-rating-text {
    display: block;
    margin-top: 8px;
    color: #666;
    font-size: 14px;
}

/* Photo Upload */
.loox-photo-upload input[type="file"] {
    margin-bottom: 10px;
}

.loox-photo-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.loox-photo-preview img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* Submit Button */
.loox-submit-button {
    background: #FFB400;
    color: white;
    padding: 12px 32px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.loox-submit-button:hover {
    background: #f0a500;
}

.loox-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Form Messages */
.loox-form-messages {
    margin-top: 16px;
}

.loox-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-top: 10px;
}

.loox-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4CAF50;
}

.loox-message.error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #e74c3c;
}

/* === No Reviews === */
.loox-no-reviews {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* === Rating Summary Widget === */
.loox-rating-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.loox-average-rating {
    font-weight: 600;
    font-size: 16px;
}

.loox-review-count {
    color: #666;
    font-size: 14px;
}

/* === Responsive === */
@media screen and (max-width: 768px) {
    .loox-reviews-summary {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .loox-carousel-wrapper {
        padding: 0 40px;
    }

    .loox-carousel-prev,
    .loox-carousel-next {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .loox-review-media {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .loox-review-form-wrapper {
        padding: 20px;
    }
}

@media screen and (max-width: 480px) {
    .loox-average-rating-big {
        font-size: 42px;
    }

    .loox-carousel-item {
        padding: 5px;
    }

    .loox-carousel-review {
        padding: 16px;
    }
}
