/* MAIN WRAPPER */
.kr-reviews-wrapper {
    background-color: #ffffff;
    border-radius: 15px;
    padding: 50px;
    max-width: 1200px;
    margin: 60px auto;
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

@media (max-width: 768px) {
    .kr-reviews-wrapper {
        padding: 24px 16px;
        margin: 30px auto;
    }
}

/* HEADER */
.kr-header {
    background-color: white;
    box-shadow: 0px 4px 16px rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 24px 16px 16px 16px;
    text-align: center;
    color: #333333;
    margin-bottom: 24px;
}

.kr-header h2 {
    font-family: "Exo 2", sans-serif;
    font-size: 150%;
    margin: 0 0 24px 0;
    color: #333333;
}

.kr-header-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 24px;
}

@media (min-width: 992px) {
    .kr-header-content {
        flex-direction: row;
    }
}

/* RATING SUMMARY */
.kr-rating-summary {
    flex: 0 0 30%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.kr-rating-summary__stars {
    color: #FCC97E;
    font-size: 16px;
    margin-bottom: 8px;
}

.kr-rating-summary__score {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.kr-rating-summary__count {
    font-size: 14px;
    color: #7b7b7b;
}

/* RATING BREAKDOWN */
.kr-rating-breakdown {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border-left: none;
}

@media (min-width: 992px) {
    .kr-rating-breakdown {
        border-left: 1px solid rgba(16,132,116,0.1);
    }
}

.kr-breakdown-row {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 300px;
    margin-bottom: 10px;
    height: 14px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.kr-breakdown-row:last-child {
    margin-bottom: 0;
}

.kr-breakdown-row:hover {
    opacity: 0.6;
}

.kr-breakdown-stars {
    width: 80px;
    font-size: 13px;
    color: #FCC97E;
    line-height: 1;
}

.kr-breakdown-bar {
    flex: 1;
    height: 14px;
    background: rgba(224,224,224,0.5);
    border-radius: 10px;
    margin: 0 16px;
    overflow: hidden;
}

.kr-breakdown-fill {
    height: 100%;
    background-color: #000;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.kr-breakdown-count {
    width: 24px;
    text-align: left;
    color: #7b7b7b;
    font-size: 14px;
}

/* WRITE REVIEW BUTTON */
.kr-write-review {
    flex: 0 0 30%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border-left: none;
}

@media (min-width: 992px) {
    .kr-write-review {
        border-left: 1px solid rgba(16,132,116,0.1);
    }
}

.kr-write-btn {
    display: block;
    width: 100%;
    max-width: 240px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    border-radius: 25px;
    color: rgb(21, 21, 21);
    background-color: #ffffff;
    border: 2px solid #000;
    text-align: center;
    transition: all 0.3s ease;
}

.kr-write-btn:hover {
    opacity: 0.8;
    color: rgb(21, 21, 21);
}

/* FILTER BAR */
.kr-filter-bar {
    background-color: white;
    box-shadow: 0px 4px 16px rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.kr-filter-label {
    font-weight: 600;
    color: #333;
}

.kr-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.kr-filter-btn {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid #e4e4e4;
    background: white;
    color: #333;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kr-filter-btn:hover {
    border-color: #000;
}

.kr-filter-btn.active {
    background: #000;
    color: white;
    border-color: #000;
}

/* REVIEWS GRID */
.kr-reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 40px;
}

@media (max-width: 1024px) {
    .kr-reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .kr-reviews-grid {
        grid-template-columns: 1fr;
    }
}

/* REVIEW CARD */
.kr-review-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kr-review-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.kr-review-header {
    margin-bottom: 10px;
}

.kr-review-stars {
    color: #FCC97E;
    font-size: 14px;
    margin-bottom: 5px;
}

.kr-review-date {
    font-size: 12px;
    color: #7b7b7b;
}

.kr-review-author {
    display: flex;
    align-items: center;
    margin: 8px 0;
}

.kr-review-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background-color: rgba(224,224,224,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    color: #000;
    font-size: 20px;
    font-weight: 600;
    flex-shrink: 0;
}

.kr-review-name {
    font-weight: 600;
    font-size: 14px;
    color: #000;
}

.kr-review-verified {
    display: inline-block;
    background-color: #000;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 5px;
    margin-left: 5px;
}

.kr-review-location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #7b7b7b;
    margin-top: 4px;
}

.kr-review-flag {
    width: 16px;
    height: auto;
}

.kr-review-images {
    margin: 10px 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.kr-review-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.kr-review-image:hover {
    opacity: 0.9;
}

@media (max-width: 600px) {
    .kr-review-image {
        height: 220px;
    }
}

.kr-review-content {
    margin-top: 10px;
}

.kr-review-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}

.kr-review-text {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.kr-review-response {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 13px;
}

.kr-review-response-label {
    font-weight: 600;
    margin-bottom: 5px;
}

.kr-review-response-body {
    line-height: 1.4;
}

/* LOAD MORE */
.kr-load-more {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
}

.kr-load-btn {
    display: inline-block;
    padding: 10px 30px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    background-color: #000;
    border: 2px solid #000;
    border-radius: 25px;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.kr-load-btn:hover {
    opacity: 0.8;
}

.kr-load-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* STARS */
.kr-star {
    display: inline-block;
    margin-right: 2px;
}

.kr-star:last-child {
    margin-right: 0;
}

.kr-star-filled::before {
    content: "★";
}

.kr-star-empty::before {
    content: "☆";
}

/* REVIEW FORM */
.kr-review-form-container {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid rgba(16,132,116,0.1);
}

.kr-review-form-wrapper {
    background: white;
    box-shadow: 0px 4px 16px rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
}

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

.kr-review-form-wrapper p {
    margin-bottom: 20px;
    color: #7b7b7b;
}

/* LOADING */
.kr-loading {
    text-align: center;
    padding: 40px;
    color: #7b7b7b;
}

.kr-loading::after {
    content: " ...";
    animation: kr-dots 1.5s infinite;
}

@keyframes kr-dots {
    0%, 20% { content: " ."; }
    40% { content: " .."; }
    60%, 100% { content: " ..."; }
}

/* EMPTY STATE */
.kr-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7b7b7b;
}

.kr-empty-state h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

/* ==================== REVIEW FORM ==================== */
.kr-review-form-container {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid rgba(16,132,116,0.1);
}

.kr-review-form-wrapper {
    background: white;
    box-shadow: 0px 4px 16px rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
}

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

.kr-form-subtitle {
    margin-bottom: 24px;
    color: #7b7b7b;
    font-size: 14px;
}

/* Form Fields */
.kr-form-field {
    margin-bottom: 20px;
}

.kr-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

.kr-form-field input[type="text"],
.kr-form-field input[type="email"],
.kr-form-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e4e4e4;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.kr-form-field input:focus,
.kr-form-field textarea:focus {
    outline: none;
    border-color: #000;
}

.kr-form-field textarea {
    resize: vertical;
}

.kr-form-field small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #7b7b7b;
}

/* Star Rating Input */
.kr-star-input {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.kr-star-btn {
    font-size: 32px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    user-select: none;
}

.kr-star-btn:hover {
    transform: scale(1.1);
}

.kr-star-btn.active {
    color: #FCC97E;
}

/* Image Upload */
.kr-image-upload-wrapper {
    position: relative;
}

.kr-file-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.kr-file-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f5f5f5;
    border: 2px dashed #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kr-file-label:hover {
    background: #ebebeb;
    border-color: #000;
}

.kr-file-icon {
    font-size: 20px;
}

.kr-image-preview {
    position: relative;
    margin-top: 12px;
    display: inline-block;
}

.kr-image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    border: 2px solid #e4e4e4;
}

.kr-remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ff4444;
    color: white;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kr-remove-image:hover {
    background: #cc0000;
}

/* Logged in notice */
.kr-logged-in-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #495057;
    font-size: 14px;
}

.kr-logged-in-notice svg {
    flex-shrink: 0;
    color: #6c757d;
}

.kr-logged-in-notice strong {
    color: #212529;
}

/* reCAPTCHA */
.kr-recaptcha-field {
    margin: 24px 0;
}

/* Submit Button */
.kr-form-actions {
    margin-top: 24px;
}

.kr-submit-btn {
    width: 100%;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    background-color: #000;
    border: 2px solid #000;
    border-radius: 25px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.kr-submit-btn:hover:not(:disabled) {
    opacity: 0.8;
}

.kr-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.kr-btn-loader {
    display: none;
}

.kr-submit-btn.loading .kr-btn-text {
    display: none;
}

.kr-submit-btn.loading .kr-btn-loader {
    display: inline;
}

/* Form Messages */
.kr-form-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
}

.kr-form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.kr-form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Field Errors */
.kr-field-error {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #dc2626;
}
