/* Review card styling */
.list-group-item-primary {
    background-color: #cfe2ff;
}

.list-group-item-danger {
    background-color: #f8d7da;
}

/* Positive review styling */
.list-group-item-primary strong,
.text-primary {
    color: #073561 !important;
    text-decoration: none !important;
}

.list-group-item-primary span {
    color: #073561 !important;
}

/* Negative review styling */
.list-group-item-danger strong,
.text-danger {
    color: #842029 !important;
    text-decoration: none !important;
}

.list-group-item-danger span {
    color: #842029 !important;
}

/* Ensure all links in reviews have no underline */
#company-reviews a,
.reviews-list a {
    text-decoration: none !important;
}

/* Default message styling (left-aligned) */
#company-reviews .card-body p {
    text-align: left;
    margin-bottom: 0;
}

/* Card footer styling */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* "View all reviews" link styling */
.card-footer a.mt-1 {
    color: #0c59a2 !important;
    text-decoration: none !important;
    white-space: nowrap;
    transition: text-decoration 0.2s;
}

/* Underline on hover with the specific color */
.card-footer a.mt-1:hover {
    text-decoration: underline;
    text-decoration-color: #0c59a2;
}

/* Mobile responsiveness */
@media (max-width: 400px) {
    .card-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-footer a.mt-1 {
        margin-bottom: 0.5rem;
    }
}

/* Review styling */
.list-group-item-primary {
    background-color: #cfe2ff;
}

.text-primary,
.list-group-item-primary .text-primary,
span.text-primary {
    color: #073561 !important; /* Specific color for positive reviews */
}

.list-group-item-danger {
    background-color: #f8d7da;
}

.text-danger,
.list-group-item-danger .text-danger,
span.text-danger {
    color: #842029 !important; /* Specific color for negative reviews */
}

/* Style for review items to keep author and text on one line */
.list-group-item {
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    padding: 1.2rem !important;
    transition: text-decoration 0.2s;
}

/* Author and text layout */
.list-group-item strong {
    margin-right: 0;
}

/* Add a separator between author and text */
.review-separator {
    border-bottom: 1px solid #0c59a2;
}

/* Disable hover effects for detailed review pages */
.company-reviews-detailed .list-group-item:hover {
    text-decoration: none !important;
    cursor: default !important;
}

/* Ensure detailed review content doesn't get underlined */
.company-reviews-detailed .review-header h5,
.company-reviews-detailed .review-body p {
    text-decoration: none !important;
}

/* Review card in company page */
#company-reviews .card-header {
    background-color: #f8f9fa;
    font-weight: 700;
}

#company-reviews .list-group-item {
    padding: 0.75rem 1rem;
}

/* Card footer styling to ensure single line display */
.card-footer.review-footer {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
}

.card-footer.review-footer a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-footer.review-footer .btn-sm.btn-warning {
    white-space: nowrap;
    flex-shrink: 0;
}

.card-footer.review-footer .review-link {
    margin-right: 15px;
    color: #0d6efd;
    text-decoration: none;
}

/* Adjust button size to fit nicely on one line */
.btn-sm.btn-warning {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    background-color: #ffc107;
    border-color: #ffc107;
}

/* Make sure links in the footer are properly styled */
.card-footer a.mt-1 {
    color: #0c59a2 !important;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
    min-width: 0;
    flex-shrink: 1;
    font-size: 0.85rem !important;
    padding-right: 10px;
    font-family: var(--font-sans-serif);
    font-size: 0.95rem;
}

.card-footer a.mt-1:hover {
    text-decoration: underline;
}

/* Style for the "leave review" button */
.card-footer .btn-sm.btn-warning {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
    font-family: var(--font-sans-serif);
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
}

/* No reviews message styling */
.no-reviews-message {
    color: var(--o-cc1-text);
    font-family: var(--font-sans-serif);
    font-size: 0.9rem;
    margin: 1rem 0;
    text-align: center;
}

/* No reviews message styling - LEFT ALIGNED */
#company-reviews .card-body p {
    color: var(--o-cc1-text);
    font-family: var(--font-sans-serif);
    font-size: var(--body-font-size);
    font-weight: var(--body-font-weight);
    line-height: var(--body-line-height);
    text-align: left;
    margin-bottom: 0;
    padding: 0.5rem 0;
    background-color: rgba(255, 255, 255, 0.9) !important;
}

/* Make sure there's enough space for both elements */
@media (max-width: 576px) {
    .card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .card-footer a.mt-1 {
        margin-right: 0;
        margin-bottom: 5px;
    }
}

/* Ensure proper spacing at smaller screen sizes */
@media (max-width: 400px) {
    .card-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-footer a.mt-1 {
        margin-bottom: 0.5rem;
        font-size: 0.9rem !important;
    }
}

/* Adjustments for larger screens */
@media (min-width: 768px) {
    .card-footer a.mt-1 {
        font-size: 1rem;
    }
}

/* Group hover effect for all reviews - but not in detailed view */
#company-reviews:hover .list-group-item,
.reviews-list:hover
    .list-group-item:not(.company-reviews-detailed .list-group-item) {
    text-decoration: underline;
    text-decoration-color: #0c59a2;
}

/* Disable group hover effect for detailed reviews */
.company-reviews-detailed:hover .list-group-item {
    text-decoration: none !important;
}

/* Star rating display improvements - remove gap between stars and rating */
.star-rating.mb-2 {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    margin-left: 0;
    padding-left: 0;
}

.star-rating.mb-2 span {
    margin-left: 0 !important;
    padding-left: 0 !important;
    display: flex;
    align-items: center;
}

.star-rating.mb-2 .me-2 {
    margin-right: 4px !important; /* Reduced from the default 0.5rem (8px) to 4px */
}

.star-rating.mb-2 .rating-value {
    margin-left: 4px !important;
    white-space: nowrap;
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

/* Ensure star icons have no spacing between them */
.star-rating-in-list__label {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1;
}

/* Ensure consistent star display across the site */
.star-rating-in-list__label {
    margin: 0;
    padding: 0;
    line-height: 1;
}

/* Clean, simplified star rating styles */
.star-rating {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0 !important;
    margin-bottom: 0.5rem !important;
    line-height: 1 !important;
    height: 16px !important;
}

.star-rating .fa-star {
    font-size: 14px !important;
    margin-right: 1px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
}

.star-rating .rating-value {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    margin-left: 5px !important;
}

.star-rating__star {
    color: #dee2e6;
}

.star-rating__star.is-selected {
    color: #ffc107;
}
