/* =============================================
   Company Review Page - Custom Styles
   ============================================= */

.cr-page-banner {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
    padding: 42px 0;
    text-align: center;
    color: #fff;
    margin-bottom: 30px;
}
.cr-page-banner h1 {
    font-size: 30px;
    font-weight: 700;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.cr-page-banner h1 i {
    font-size: 34px;
    color: #0A66C2;
}
.cr-page-banner p {
    font-size: 15px;
    opacity: 0.80;
    margin: 0;
}

/* ---- Section sub-title ---- */
.cr-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #084d94;
    border-bottom: 2px solid #0A66C2;
    display: inline-block;
    padding-bottom: 4px;
    margin-bottom: 22px;
}

/* ---- Form groups ---- */
.cr-form-group {
    margin-bottom: 20px;
}
.cr-form-group label {
    display: block;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
    font-size: 14px;
}

/* ---- Rating cards grid ---- */
.cr-ratings-grid {
    margin-top: 10px;
}
.cr-rating-card {
    background: #fff;
    border: 1px solid #e0e6ea;
    border-radius: 10px;
    padding: 20px 14px 16px;
    text-align: center;
    margin-bottom: 25px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    height: 100%;
    min-height: 165px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}
.cr-rating-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,0.09);
    border-color: #90b8e0;
}
.cr-rating-card.cr-card-rated {
    border-color: #0A66C2;
    background: #f0f5fb;
}
.cr-rating-card.cr-card-error {
    border-color: #e53935;
    background: #fff5f5;
}
.cr-card-error-msg {
    font-size: 11px;
    color: #e53935;
    margin-top: 5px;
    font-style: italic;
    display: none;
}
.cr-rating-card.cr-card-error .cr-card-error-msg {
    display: block;
}
.cr-rating-name {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.35;
}
.cr-rating-desc {
    font-size: 11px;
    color: #999;
    margin-bottom: 12px;
    line-height: 1.4;
    flex-grow: 1;
}

/* ---- Interactive stars ---- */
.cr-stars {
    display: flex;
    justify-content: center;
    gap: 3px;
}
.cr-stars i {
    font-size: 26px;
    color: #ccc;
    cursor: pointer;
    transition: color 0.12s ease, transform 0.1s ease;
    user-select: none;
    -webkit-user-select: none;
}
.cr-stars i.cr-filled {
    color: #0A66C2;
}
.cr-stars i:hover {
    transform: scale(1.15);
}
.cr-star-label {
    font-size: 11px;
    color: #888;
    margin-top: 5px;
    min-height: 16px;
    font-style: italic;
}

/* ---- Submit button ---- */
.cr-submit-wrap {
    text-align: center;
    margin-top: 10px;
}
.cr-submit-btn {
    background: #0A66C2;
    color: #fff !important;
    border: none;
    padding: 13px 44px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s ease, transform 0.12s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(10,102,194,0.35);
    letter-spacing: 0.3px;
    text-decoration: none;
}
.cr-submit-btn:hover {
    background: #084d94;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10,102,194,0.45);
    text-decoration: none;
}
.cr-submit-btn i {
    font-size: 20px;
}
.cr-submit-btn:disabled {
    background: #aaa;
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

/* ---- Feedback messages ---- */
.cr-msg {
    border-radius: 7px;
    padding: 12px 18px;
    margin-bottom: 18px;
    font-size: 14px;
    align-items: center;
    gap: 8px;
}
.cr-msg-success {
    background: #e8f0fb;
    color: #084d94;
    border: 1px solid #b3d1f5;
}
.cr-msg-fail {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}
.cr-msg-warn {
    background: #fff8e1;
    color: #f57f17;
    border: 1px solid #ffe082;
}
.cr-msg i {
    font-size: 20px;
    flex-shrink: 0;
}

/* ---- Review display cards ---- */
.cr-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.cr-review-card {
    border: 1px solid #e4eaed;
    border-radius: 10px;
    padding: 20px 22px;
    background: #fff;
    transition: box-shadow 0.2s;
}
.cr-review-card:hover {
    box-shadow: 0 3px 14px rgba(0,0,0,0.07);
}
.cr-rev-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}
.cr-rev-company {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cr-rev-company i {
    font-size: 18px;
    color: #0A66C2;
}
.cr-rev-meta {
    font-size: 12px;
    color: #aaa;
}
.cr-rev-reviewer {
    font-size: 13px;
    color: #666;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.cr-rev-reviewer i {
    font-size: 15px;
    color: #999;
}
.cr-rev-ratings-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.cr-rev-chip {
    background: #f0f5fb;
    border: 1px solid #b3d1f5;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
}
.cr-rev-chip .cr-chip-stars {
    display: flex;
    gap: 1px;
}
.cr-rev-chip .cr-chip-stars i {
    font-size: 12px;
    color: #0A66C2;
}
.cr-rev-chip .cr-chip-stars i.empty {
    color: #ddd;
}
.cr-rev-chip-label {
    font-weight: 600;
    color: #555;
}
.cr-rev-comment {
    background: #f8f9fb;
    border-left: 3px solid #0A66C2;
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-top: 4px;
}
.cr-no-reviews {
    text-align: center;
    color: #aaa;
    padding: 40px 0;
    font-size: 15px;
}
.cr-no-reviews i {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
    color: #ddd;
}

/* ---- Average score badge ---- */
.cr-avg-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e8f0fb;
    border: 1px solid #90b8e0;
    border-radius: 20px;
    padding: 3px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #084d94;
}
.cr-avg-badge i {
    font-size: 16px;
    color: #0A66C2;
}

/* ---- Detail page: company header card ---- */
.cr-detail-header-card {
    background: linear-gradient(135deg, #0A66C2 0%, #084d94 100%);
    border-radius: 12px;
    padding: 28px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.cr-detail-co-icon {
    width: 64px;
    height: 64px;
    background: rgba(255,255,255,0.18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cr-detail-co-icon i {
    font-size: 34px;
    color: #fff;
}
.cr-detail-co-info {
    flex: 1;
}
.cr-detail-co-name {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px;
}
.cr-detail-co-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.cr-detail-co-meta .cr-co-count {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
    color: #fff;
}
.cr-detail-co-meta .cr-co-count i {
    color: #fff;
}
.cr-detail-co-meta .cr-avg-badge {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
    color: #fff;
}
.cr-detail-co-meta .cr-avg-badge i {
    color: #ffd700;
}

/* ---- Chosen vendor dropdown override ---- */
#company_name_select_chosen {
    height: 38px;
}
#company_name_select_chosen .chosen-single {
    height: 38px;
    line-height: 36px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    box-shadow: none;
    padding: 0 26px 0 12px;
    font-size: 14px;
    color: #555;
}
#company_name_select_chosen .chosen-single span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
#company_name_select_chosen .chosen-single div {
    top: 8px;
    right: 8px;
}
#company_name_select_chosen .chosen-search {
    padding: 6px 6px 4px;
}
#company_name_select_chosen .chosen-search input[type="text"] {
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    padding: 0 8px;
    width: 100%;
    box-sizing: border-box;
}
#company_name_select_chosen .chosen-drop {
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    margin-top: 0;
}
#company_name_select_chosen.chosen-container-active .chosen-single {
    border-color: #0A66C2;
    outline: 0;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px rgba(10,102,194,0.4);
}

/* ---- Company-wise listing (main page) ---- */
.cr-companies-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.cr-company-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border: 1px solid #e0e6ea;
    border-radius: 10px;
    padding: 18px 22px;
    background: #fff;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.cr-company-card:hover {
    box-shadow: 0 4px 16px rgba(10,102,194,0.1);
    border-color: #90b8e0;
}
.cr-company-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.cr-co-name {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 7px;
}
.cr-co-name i {
    font-size: 20px;
    color: #0A66C2;
}
.cr-co-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #666;
    background: #f0f5fb;
    border: 1px solid #b3d1f5;
    border-radius: 20px;
    padding: 3px 12px;
}
.cr-co-count i {
    font-size: 15px;
    color: #0A66C2;
}
.cr-company-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.cr-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #0A66C2;
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 20px;
    text-decoration: none !important;
    transition: background 0.2s, transform 0.12s;
    white-space: nowrap;
}
.cr-view-btn i {
    font-size: 16px;
}
.cr-view-btn:hover {
    background: #084d94;
    color: #fff !important;
    transform: translateX(2px);
}

/* ---- Review search bar ---- */
.cr-search-wrap {
    position: relative;
    min-width: 280px;
}
.cr-search-wrap i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #0A66C2;
    pointer-events: none;
}
.cr-search-input {
    width: 100%;
    padding: 9px 16px 9px 40px;
    border: 2px solid #0A66C2;
    border-radius: 24px;
    font-size: 14px;
    color: #333;
    background: #f0f5fb;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}
.cr-search-input::placeholder {
    color: #7aabdb;
}
.cr-search-input:focus {
    border-color: #084d94;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(10,102,194,0.15);
}

/* ---- Company logo in list card ---- */
.cr-co-logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #e0e6ea;
    background: #fff;
    flex-shrink: 0;
}

/* ---- Company logo in detail header card ---- */
.cr-detail-co-logo-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.5);
    background: #fff;
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
    .cr-page-banner h1 {
        font-size: 22px;
    }
    .cr-page-banner p {
        font-size: 13px;
    }
    .cr-stars i {
        font-size: 22px;
    }
    .cr-rating-card {
        min-height: auto;
    }
    .cr-submit-btn {
        width: 100%;
        justify-content: center;
    }
    .cr-rev-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
@media (max-width: 480px) {
    .cr-rev-chip {
        font-size: 11px;
        padding: 3px 8px;
    }
}
