/* ===================================================================
   File: feedback.css
   Description: Page-specific styles for the Feedback & Reviews page.
   =================================================================== */

/* --- Feedback Hero Section --- */
.feedback-hero {
    padding: 120px 0;
    text-align: center;
    background: linear-gradient(rgba(10, 10, 42, 0.85), rgba(10, 10, 42, 0.85)), url('https://images.unsplash.com/photo-1588497836292-231215b8b6a3?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover;
    position: relative;
}

.feedback-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
}

.feedback-hero p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    color: var(--secondary-text);
}

/* --- Feedback Stats Section --- */
.feedback-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.stats-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.stats-card .stats-value {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 5px;
}

.stats-card .stars {
    color: #f39c12;
    margin-bottom: 10px;
}

.stats-card .stats-title {
    font-size: 1rem;
    color: var(--secondary-text);
}

.stats-card .stats-source {
    margin-top: 15px;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* --- Feedback Display Section --- */
.feedback-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn-feedback {
    padding: 10px 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: var(--primary-text);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    transition: all 0.3s ease;
}

.filter-btn-feedback.active,
.filter-btn-feedback:hover {
    background: var(--accent-cyan);
    color: var(--dark-blue);
    border-color: var(--accent-cyan);
}

.feedback-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.review-card {
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    padding: 25px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(51, 213, 229, 0.15);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.review-author h4 {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.review-author span {
    font-size: 0.9rem;
    color: var(--secondary-text);
}

.review-stars {
    color: #f39c12;
    font-size: 1rem;
    flex-shrink: 0;
}

.review-body p {
    margin-bottom: 20px;
    flex-grow: 1;
}

.review-gallery {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.review-gallery a {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
}

.review-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.review-gallery a:hover img {
    transform: scale(1.1);
}

/* --- Feedback Form Section --- */
.feedback-form-container {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.form-guidelines h3 {
    font-size: 1.8rem;
    color: var(--accent-cyan);
    margin-bottom: 15px;
}

.form-guidelines p {
    margin-bottom: 20px;
}

.form-guidelines ul {
    list-style: none;
    padding-left: 0;
}

.form-guidelines ul li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.form-guidelines ul li i {
    color: var(--accent-pink);
    margin-top: 5px;
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row label {
    font-weight: 600;
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
}

.star-rating input { display: none; }

.star-rating label {
    font-size: 2rem;
    color: #444;
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating input:not(:checked) ~ label:hover,
.star-rating input:not(:checked) ~ label:hover ~ label {
    color: var(--accent-pink);
}

.star-rating input:checked ~ label {
    color: #f39c12;
}

#rating-value {
    margin-left: 15px;
    font-weight: 600;
    color: var(--accent-cyan);
    transition: opacity 0.3s;
}

.category-rating-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.category-rating {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-rating .stars {
    font-size: 1.2rem;
}

/* Custom File Upload */
#photo-upload-label {
    padding: 15px;
    background: var(--dark-blue);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

#photo-upload-label:hover {
    border-color: var(--accent-cyan);
    background: #0e0e30;
}

#file-chosen {
    display: block;
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--secondary-text);
}


/* --- Responsive Styles for Feedback Page --- */

@media (max-width: 992px) {
    .feedback-form-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .feedback-hero h1 {
        font-size: 2.5rem;
    }
    .feedback-grid {
        grid-template-columns: 1fr;
    }
    .feedback-form-container {
        padding: 25px;
    }
}

/* === NEWLY ADDED STYLES START HERE === */

/* --- Feedback Search & Sort Controls --- */
.feedback-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}
.search-wrapper {
    position: relative;
    flex-grow: 1;
    min-width: 300px;
}
.search-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-text);
}
#review-search {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: var(--dark-blue);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--primary-text);
    font-family: 'Poppins', sans-serif;
}
.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}
#review-sort {
    padding: 10px 15px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--primary-text);
    border-radius: 8px;
}

/* --- Detailed Ratings in Review Card --- */
.detailed-ratings {
    margin-top: 15px;
    margin-bottom: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}
.rating-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--secondary-text);
    margin-bottom: 5px;
}
.rating-item .stars {
    font-size: 0.9rem;
}

/* --- Verified Badge & Helpful Button --- */
.verified-badge {
    font-size: 0.8rem;
    color: #2ecc71; /* Green color for verification */
    font-weight: 500;
    margin-left: 10px;
}
.review-footer {
    margin-top: 15px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    text-align: right;
}
.helpful-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--secondary-text);
    padding: 5px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.helpful-btn:hover, .helpful-btn.clicked {
    background-color: var(--accent-cyan);
    color: var(--dark-blue);
    border-color: var(--accent-cyan);
}

/* --- Video Review Thumbnail Styles --- */
.video-thumbnail-wrapper {
    position: relative;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
}
.video-thumbnail-wrapper img {
    width: 100%;
    display: block;
}
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(232, 73, 232, 0.8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    transition: transform 0.3s ease, background 0.3s ease;
}
.video-thumbnail-wrapper:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--accent-pink);
}
/* Styles for smaller star ratings inside the form */
.star-rating.small label {
    font-size: 1.5rem;
}
.category-rating-group {
    background-color: var(--dark-blue);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* ===================================================
   NEW ADVANCED STYLES
   =================================================== */

/* --- Rating Distribution Chart --- */
.rating-distribution {
    background: var(--dark-blue);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-top: 25px;
}
.dist-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 5px;
}
.dist-row:hover {
    background-color: rgba(51, 213, 229, 0.1);
}
.dist-label {
    flex-shrink: 0;
    width: 60px;
    text-align: right;
    color: var(--secondary-text);
}
.dist-bar-wrapper {
    flex-grow: 1;
    background-color: #080824;
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
}
.dist-bar {
    height: 100%;
    background-color: #f39c12; /* Yellow star color */
    border-radius: 10px;
    transition: width 0.5s ease-in-out;
}
.dist-percent {
    width: 50px;
    flex-shrink: 0;
    color: var(--secondary-text);
}

/* --- Project Metadata on Review Cards --- */
.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}
.meta-item {
    font-size: 0.85rem;
    color: var(--secondary-text);
    background: var(--dark-blue);
    padding: 5px 10px;
    border-radius: 5px;
}
.meta-item i {
    margin-right: 5px;
    color: var(--accent-cyan);
}

/* --- Reply from Owner --- */
.owner-reply {
    background: var(--dark-blue);
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    border-left: 3px solid var(--accent-pink);
}
.owner-reply h5 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-pink);
    margin-bottom: 5px;
}
.owner-reply p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* --- Q&A Section --- */
.qa-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}
.qa-item {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}
.qa-question {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}
.qa-question .q-icon, .qa-answer .a-icon {
    font-size: 1.5rem;
    color: var(--accent-cyan);
}
.qa-question h4 {
    font-size: 1.2rem;
    font-weight: 600;
}
.qa-question span {
    font-size: 0.9rem;
    color: var(--secondary-text);
    margin-top: 5px;
    display: block;
}
.qa-answer {
    display: flex;
    gap: 15px;
    margin-left: 40px;
}
.qa-answer .a-icon {
    color: var(--accent-pink);
}
.qa-answer span {
    font-weight: 600;
    color: var(--primary-text);
    display: block;
    margin-bottom: 5px;
}
#ask-question-form {
    margin-top: 40px;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
}
#ask-question-form h3 {
    text-align: center;
    margin-bottom: 20px;
}