/* Dante Reviews Frontend Styles */

.dante-reviews-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Header Section */
.dante-reviews-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 3px solid #c0392b;
}

.reviews-title {
    font-size: 36px;
    font-weight: bold;
    color: #000;
    margin: 0 0 20px 0;
}

.reviews-summary {
    display: flex;
    justify-content: center;
    align-items: center;
}

.average-rating {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rating-number {
    font-size: 48px;
    font-weight: bold;
    color: #c0392b;
}

.stars-display {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2px;
}

.stars-display .star {
    color: #ddd;
    font-size: 24px;
    margin: 0;
}

.stars-display .star.filled {
    color: #f39c12;
}

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

/* Reviews List */
.dante-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.no-reviews {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 12px;
}

.no-reviews p {
    font-size: 18px;
    color: #666;
    margin: 0;
}

/* Review Item */
.review-item {
    background: #fff;
    border: 2px solid #000;
    border-radius: 12px;
    padding: 30px;
    transition: all 0.3s ease;
    position: relative;
}

.review-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-color: #c0392b;
}

.review-item.pending-review {
    border-color: #f39c12;
    background: #fffbf0;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.reviewer-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.reviewer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.initials-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    border: 3px solid #000;
}

.reviewer-details {
    display: flex;
    flex-direction: column;
}

.reviewer-name {
    font-size: 20px;
    font-weight: bold;
    color: #000;
    margin: 0 0 5px 0;
}

.reviewer-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.reviewer-country::before {
    content: '📍 ';
}

.review-date::before {
    content: '🕒 ';
}

.review-rating {
    display: flex;
    gap: 5px;
}

.review-rating .star {
    color: #ddd;
    font-size: 24px;
}

.review-rating .star.filled {
    color: #f39c12;
}

.review-content {
    margin: 20px 0;
    line-height: 1.8;
}

.review-content p {
    color: #333;
    font-size: 16px;
    margin: 0 0 15px 0;
}

.review-image {
    margin-top: 15px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #ddd;
    max-width: 250px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.review-image:hover {
    border-color: #c0392b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.review-image::after {
    content: '🔍 Click to preview';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px;
    font-size: 12px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.review-image:hover::after {
    opacity: 1;
}

.review-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 150px;
    object-fit: cover;
}

/* Image Preview Modal */
.dante-image-preview-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s;
}

.dante-image-preview-content {
    position: relative;
    margin: auto;
    padding: 0;
    width: 90%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.dante-image-preview-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.dante-image-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10002;
}

.dante-image-close:hover {
    color: #c0392b;
    transform: scale(1.2);
}

.pending-badge {
    margin-top: 15px;
    padding: 10px 15px;
    background: #fff3cd;
    border: 2px solid #f39c12;
    border-radius: 6px;
    display: inline-block;
}

.pending-badge span {
    color: #856404;
    font-weight: bold;
    font-size: 14px;
}

/* Review Response */
.review-response {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid #c0392b;
    border-radius: 8px;
}

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

.response-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.response-avatar .initials-avatar {
    width: 40px;
    height: 40px;
    font-size: 16px;
}

.response-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.response-info strong {
    color: #c0392b;
    font-size: 16px;
}

.response-date {
    font-size: 12px;
    color: #666;
}

.response-content p {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

/* Admin Actions */
.admin-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #ddd;
}

.admin-actions .dante-approve-btn {
    background: #27ae60;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-actions .dante-approve-btn:hover {
    background: #229954;
    transform: translateY(-2px);
}

/* Floating Review Button */
.dante-floating-review-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #c0392b;
    color: #fff;
    border: none;
    padding: 18px 30px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(192, 57, 43, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    z-index: 1000;
}

.dante-floating-review-btn:hover {
    background: #a93226;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(192, 57, 43, 0.5);
}

.btn-icon {
    font-size: 20px;
}

/* Modal */
.dante-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
    -webkit-overflow-scrolling: touch;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.dante-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 40px;
    border: 3px solid #000;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    animation: slideIn 0.3s;
    scrollbar-width: thin;
    scrollbar-color: #c0392b #f0f0f0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar for webkit browsers */
.dante-modal-content::-webkit-scrollbar {
    width: 8px;
}

.dante-modal-content::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.dante-modal-content::-webkit-scrollbar-thumb {
    background: #c0392b;
    border-radius: 4px;
}

.dante-modal-content::-webkit-scrollbar-thumb:hover {
    background: #a93226;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.dante-close {
    color: #000;
    float: right;
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
}

.dante-close:hover {
    color: #c0392b;
    transform: scale(1.2);
}

.dante-modal-content h2 {
    margin: 0 0 30px 0;
    color: #000;
    font-size: 28px;
    border-bottom: 3px solid #c0392b;
    padding-bottom: 15px;
}

/* Form Styles */
#dante-review-form .form-group {
    margin-bottom: 25px;
}

#dante-review-form label {
    display: block;
    font-weight: bold;
    color: #000;
    margin-bottom: 8px;
    font-size: 15px;
}

#dante-review-form input[type="text"],
#dante-review-form textarea,
#dante-review-form input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s;
}

#dante-review-form .field-description {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
    font-style: italic;
}

#dante-review-form input[type="text"]:focus,
#dante-review-form textarea:focus {
    border-color: #c0392b;
    outline: none;
}

#dante-review-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* Star Rating Input */
.star-rating-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
    align-items: center;
}

.rating-text {
    font-size: 14px;
    font-weight: bold;
    color: #f39c12;
    min-width: 80px;
}

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

.star-rating label {
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0;
    user-select: none;
    -webkit-user-select: none;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
    -webkit-text-stroke: 1px #ddd;
}

/* Rating 1 - Red */
.star-rating input[type="radio"]#star1:checked ~ label,
.star-rating.rating-1 label.active {
    color: #e74c3c;
    -webkit-text-stroke: 1px #c0392b;
}

/* Rating 2 - Orange */
.star-rating input[type="radio"]#star2:checked ~ label,
.star-rating.rating-2 label.active {
    color: #ff9800;
    -webkit-text-stroke: 1px #e67e22;
}

/* Rating 3 - Blue */
.star-rating input[type="radio"]#star3:checked ~ label,
.star-rating.rating-3 label.active {
    color: #3498db;
    -webkit-text-stroke: 1px #2980b9;
}

/* Rating 4 - Pale Green */
.star-rating input[type="radio"]#star4:checked ~ label,
.star-rating.rating-4 label.active {
    color: #7ed957;
    -webkit-text-stroke: 1px #5fb332;
}

/* Rating 5 - Dark Green */
.star-rating input[type="radio"]#star5:checked ~ label,
.star-rating.rating-5 label.active {
    color: #27ae60;
    -webkit-text-stroke: 1px #229954;
}

/* Hover effects with appropriate colors */
.star-rating label.hover {
    transform: scale(1.1);
}

.star-rating.hover-1 label.hover {
    color: #e74c3c;
    -webkit-text-stroke: 1px #c0392b;
}

.star-rating.hover-2 label.hover {
    color: #ff9800;
    -webkit-text-stroke: 1px #e67e22;
}

.star-rating.hover-3 label.hover {
    color: #3498db;
    -webkit-text-stroke: 1px #2980b9;
}

.star-rating.hover-4 label.hover {
    color: #7ed957;
    -webkit-text-stroke: 1px #5fb332;
}

.star-rating.hover-5 label.hover {
    color: #27ae60;
    -webkit-text-stroke: 1px #229954;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.form-actions button {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: #95a5a6;
    color: #fff;
}

.btn-cancel:hover {
    background: #7f8c8d;
}

.btn-submit {
    background: #c0392b;
    color: #fff;
}

.btn-submit:hover {
    background: #a93226;
    transform: translateY(-2px);
}

/* Login Modal Styles */
.login-modal-body {
    text-align: center;
    padding: 20px 0;
}

.login-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.login-message {
    font-size: 18px;
    font-weight: bold;
    color: #000;
    margin: 20px 0 10px;
}

.login-description {
    font-size: 15px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.login-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    margin-top: 30px;
}

.btn-login {
    background: #c0392b;
    color: #fff;
    padding: 14px 40px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    width: 100%;
    max-width: 300px;
    text-align: center;
}

.btn-login:hover {
    background: #a93226;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(192, 57, 43, 0.3);
}

.login-actions .btn-cancel {
    background: transparent;
    color: #666;
    padding: 10px 30px;
    font-size: 15px;
}

.login-actions .btn-cancel:hover {
    background: #f5f5f5;
    color: #000;
}

/* Responsive */
@media (max-width: 768px) {
    .dante-reviews-container {
        padding: 20px 15px;
    }
    
    .reviews-title {
        font-size: 28px;
    }
    
    .rating-number {
        font-size: 36px;
    }
    
    .review-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .review-rating {
        align-self: flex-start;
    }
    
    .dante-floating-review-btn {
        bottom: 20px;
        right: 20px;
        padding: 15px 20px;
        font-size: 14px;
    }
    
    .btn-text {
        display: none;
    }
    
    .dante-modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 25px;
        max-height: 95vh;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }

    .star-rating-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .rating-text {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .reviewer-avatar,
    .initials-avatar {
        width: 50px;
        height: 50px;
    }
    
    .initials-avatar {
        font-size: 20px;
    }
    
    .reviewer-name {
        font-size: 18px;
    }
    
    .reviewer-meta {
        flex-direction: column;
        gap: 5px;
    }
}
