/* Restaurant Reviews - Exact Design Styles */

.tripadvisor-reviews {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.tr-header {
    background: transparent;
    color: #333;
    padding: 20px;
    text-align: center;
}

.tr-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.tr-overview {
    display: flex;
    padding: 30px;
    gap: 40px;
    background: #f8f9fa;
}

.tr-rating-big {
    text-align: center;
    min-width: 200px;
}

.tr-rating-number {
    font-size: 48px;
    font-weight: bold;
    color: #f7bf24;
    line-height: 1;
}

.tr-stars-big {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin: 10px 0;
}

.tr-star {
    width: 20px;
    height: 20px;
    background: #f7bf24;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.tr-star.half {
    background: linear-gradient(90deg, #f7bf24 50%, #ddd 50%);
}

.tr-star.partial {
    background: linear-gradient(90deg, #f7bf24 var(--partial-percentage, 0%), #ddd var(--partial-percentage, 0%));
}

.tr-star.empty {
    background: #ddd;
}

.tr-rating-text {
    font-size: 14px;
    color: #666;
    margin: 5px 0;
}

.tr-breakdown {
    flex: 1;
}

.tr-breakdown-row {
    display: flex;
    align-items: center;
    margin: 8px 0;
    gap: 10px;
}

.tr-breakdown-label {
    min-width: 80px;
    font-size: 14px;
    color: #333;
}

.tr-breakdown-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.tr-breakdown-fill {
    height: 100%;
    background: #f7bf24;
    transition: width 0.3s ease;
}

.tr-breakdown-count {
    min-width: 30px;
    text-align: right;
    font-size: 14px;
    color: #666;
}

.tr-categories {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.tr-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.tr-tab {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    transition: all 0.3s ease;
}

.tr-tab:hover {
    background: #e9ecef;
    color: #333;
}

.tr-tab.active {
    background: #f7bf24;
    color: white;
}

.tr-content {
    position: relative;
}

.tr-content > div {
    display: none;
    padding: 30px;
}

.tr-content > div.active {
    display: block;
}

.tr-success {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: none;
}

.tr-form-notice {
    background: #e7f3ff;
    color: #0066cc;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.tr-form-layout {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
}

.tr-form-left,
.tr-form-right {
    flex: 1;
}

.tr-form-left h4,
.tr-form-right h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
}

.tr-category-rating {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.tr-category-label {
    font-weight: 600;
    color: #333;
    min-width: 90px;
    font-size: 14px;
}

.tr-category-circles {
    display: flex;
    gap: 6px;
    align-items: center;
}

.tr-rating-circle {
    width: 20px;
    height: 20px;
    background: #ddd;
    border: 1px solid #ccc;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tr-rating-circle:hover {
    background: #f7bf24;
    border-color: #f7bf24;
}

.tr-rating-circle.active {
    background: #f7bf24;
    border-color: #f7bf24;
}

.tr-name-email-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.tr-form-group {
    margin-bottom: 20px;
    flex: 1;
}

.tr-form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.tr-form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.tr-form-input:focus {
    outline: none;
    border-color: #f7bf24;
    box-shadow: 0 0 0 2px rgba(247, 191, 36, 0.2);
}

.tr-form-textarea {
    min-height: 120px;
    resize: vertical;
}

.tr-character-count {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Upload Styles */
.tr-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.tr-upload-area:hover {
    border-color: #f7bf24;
    background: #f0f8f6;
}

.tr-upload-area.dragover {
    border-color: #f7bf24;
    background: #e8f5f1;
}

.tr-upload-content {
    pointer-events: none;
}

.tr-upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.tr-upload-text {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.tr-upload-subtext {
    font-size: 14px;
    color: #666;
}

.tr-uploaded-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.tr-uploaded-image {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
}

.tr-uploaded-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

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

.tr-submit-btn {
    background: #f7bf24;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
}

.tr-submit-btn:hover {
    background: #ed8f0d;
}

.tr-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Reviews List */
.tr-reviews-list {
    /* Remove max-height and overflow to allow full page scroll */
}

.tr-review-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 0;
}

.tr-review-item:last-child {
    border-bottom: none;
}

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

.tr-review-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

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

.tr-review-info {
    flex: 1;
}

.tr-review-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
    margin-bottom: 2px;
}

.tr-review-status {
    font-size: 14px;
    color: #f7bf24;
    font-weight: 500;
    margin-bottom: 4px;
}

.tr-review-meta {
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tr-review-separator {
    color: #ccc;
}

.tr-review-date {
    color: #666;
    font-size: 14px;
    text-align: right;
}

.tr-review-stars {
    display: flex;
    gap: 2px;
    margin-bottom: 10px;
}

.tr-review-star {
    width: 16px;
    height: 16px;
    background: #f7bf24;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.tr-review-star.partial {
    background: linear-gradient(90deg, #f7bf24 var(--partial-percentage, 0%), #ddd var(--partial-percentage, 0%));
}

.tr-review-star.empty {
    background: #ddd;
}

.tr-review-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.tr-review-text {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.tr-review-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.tr-review-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
}

.tr-review-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.tr-review-image img:hover {
    transform: scale(1.05);
}

.tr-review-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.tr-review-category {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tr-review-category span {
    font-size: 14px;
    color: #666;
    min-width: 60px;
}

.tr-review-category-stars {
    display: flex;
    gap: 2px;
}

/* Reply functionality */
.tr-review-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.tr-reply-btn {
    background: #f7bf24;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.tr-reply-btn:hover {
    background: #ed8f0d;
}

.tr-reply-form {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.tr-reply-form-content h5 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.tr-reply-fields {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.tr-reply-field {
    flex: 1;
}

.tr-reply-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.tr-reply-field input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.tr-reply-field input:focus {
    outline: none;
    border-color: #f7bf24;
    box-shadow: 0 0 0 2px rgba(247, 191, 36, 0.2);
}

.tr-reply-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 10px;
}

.tr-reply-actions {
    display: flex;
    gap: 10px;
}

.tr-submit-reply-btn {
    background: #f7bf24;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.tr-submit-reply-btn:hover {
    background: #ed8f0d;
}

.tr-cancel-reply-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.tr-cancel-reply-btn:hover {
    background: #5a6268;
}

.tr-replies {
    margin-top: 15px;
}

.tr-reply-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 3px solid #f7bf24;
}

.tr-reply-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.tr-reply-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

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

.tr-reply-info {
    flex: 1;
}

.tr-reply-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 2px;
}

.tr-reply-status {
    font-size: 12px;
    color: #f7bf24;
    font-weight: 500;
    margin-bottom: 3px;
}

.tr-reply-meta {
    font-size: 11px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tr-reply-separator {
    color: #ccc;
}

.tr-reply-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.tr-reply-text {
    color: #555;
    line-height: 1.5;
}

/* Login message */
.tr-login-message {
    margin-top: 15px;
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    text-align: center;
}

.tr-login-content h5 {
    margin: 0 0 10px 0;
    color: #856404;
    font-size: 18px;
}

.tr-login-content p {
    margin: 0 0 15px 0;
    color: #856404;
    font-size: 14px;
}

.tr-login-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.tr-login-btn {
    background: #f7bf24;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

.tr-login-btn:hover {
    background: #ed8f0d;
    color: white;
}

.tr-cancel-login-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.tr-cancel-login-btn:hover {
    background: #5a6268;
}

/* Mobile Login Buttons */
@media (max-width: 768px) {
    .tr-login-btn, .tr-cancel-login-btn {
        flex: 1 !important;
        padding: 15px 10px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
        min-height: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }
    
    .tr-login-btn {
        background: #f7bf24 !important;
        color: white !important;
        font-weight: 700 !important;
        border: 2px solid #f7bf24 !important;
    }
    
    .tr-login-btn:hover {
        background: #ed8f0d !important;
        border-color: #ed8f0d !important;
    }
    
    .tr-cancel-login-btn {
        background: #6c757d !important;
        color: white !important;
        font-weight: 700 !important;
        border: 2px solid #6c757d !important;
    }
    
    .tr-cancel-login-btn:hover {
        background: #5a6268 !important;
        border-color: #5a6268 !important;
    }
    
    .tr-login-actions {
        flex-direction: column !important;
        gap: 15px !important;
        width: 100% !important;
    }
    
    .tr-login-message {
        padding: 25px 20px !important;
        margin: 15px 0 !important;
    }
    
    .tr-login-content h5 {
        font-size: 20px !important;
        margin-bottom: 15px !important;
    }
    
    .tr-login-content p {
        font-size: 16px !important;
        margin-bottom: 20px !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .tr-review-avatar {
        width: 35px;
        height: 35px;
    }
    
    .tr-reply-avatar {
        width: 30px;
        height: 30px;
    }
    
    .tr-overview {
        flex-direction: column;
        gap: 20px;
    }
    
    .tr-form-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .tr-name-email-row {
        flex-direction: column;
        gap: 0;
    }
    
    .tr-review-categories {
        flex-direction: column;
        gap: 10px;
    }
    
    .tr-tabs {
        flex-direction: column;
    }
    
    .tr-tab {
        text-align: center;
    }
}

/* Pagination */
.tr-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding: 20px 0;
}

.tr-page-link {
    display: inline-block;
    padding: 8px 12px;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.tr-page-link:hover {
    background: #f7bf24;
    color: white;
    border-color: #f7bf24;
}

.tr-page-link.active {
    background: #f7bf24;
    color: white;
    border-color: #f7bf24;
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.tr-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #f7bf24;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}