/**
 * Twingital Directory Reviews - Frontend Styles
 * Path: assets/css/frontend.css
 */

/* ==========================================
   REVIEWS SECTION
   ========================================== */
.tdr-reviews-section {
    margin: 40px 0;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tdr-reviews-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 30px 0;
}

/* ==========================================
   RATING OVERVIEW
   ========================================== */
.tdr-reviews-stats {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    margin-bottom: 30px;
}

.tdr-rating-overview {
    text-align: center;
}

.tdr-rating-number {
    font-size: 64px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 10px;
}

.tdr-rating-stars {
    font-size: 24px;
    margin-bottom: 10px;
}

.tdr-rating-count {
    color: #64748b;
    font-size: 14px;
}

/* ==========================================
   RATING BREAKDOWN
   ========================================== */
.tdr-rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tdr-rating-row {
    display: grid;
    grid-template-columns: 80px 1fr 60px;
    align-items: center;
    gap: 15px;
}

.tdr-rating-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.tdr-rating-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
}

.tdr-rating-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b 0%, #f97316 100%);
    border-radius: 20px;
    transition: width 0.3s ease;
}

.tdr-rating-percentage {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    text-align: right;
}

/* ==========================================
   REVIEW FORM
   ========================================== */
.tdr-review-form-wrapper {
    padding: 30px;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 30px;
}

.tdr-review-form-wrapper h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 20px 0;
}

.tdr-form-group {
    margin-bottom: 20px;
}

.tdr-form-group label {
    display: block;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.tdr-form-group input[type="text"],
.tdr-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
}

.tdr-form-group input[type="text"]:focus,
.tdr-form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ==========================================
   STAR RATING INPUT
   ========================================== */
.tdr-star-rating-input {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
}

.tdr-star-rating-input input {
    display: none;
}

.tdr-star-rating-input label {
    font-size: 36px;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s;
    order: 0;
}

.tdr-star-rating-input label:hover {
    color: #fbbf24;
    transform: scale(1.15);
}

.tdr-star-rating-input label.active {
    color: #f59e0b;
}

.tdr-star-rating-input label.hover-active {
    color: #fbbf24;
}

/* Efecto de brillo en hover */
.tdr-star-rating-input label:hover {
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.6));
}

.tdr-submit-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tdr-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.tdr-submit-btn:active {
    transform: translateY(0);
}

.tdr-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================
   LOGIN PROMPT
   ========================================== */
.tdr-login-prompt {
    padding: 20px;
    background: #fef3c7;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 30px;
}

.tdr-login-prompt p {
    margin: 0;
    color: #92400e;
}

.tdr-login-prompt a {
    color: #b45309;
    font-weight: 600;
    text-decoration: underline;
}

/* ==========================================
   REVIEWS LIST
   ========================================== */
.tdr-reviews-list h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.tdr-review-item {
    padding: 25px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.tdr-review-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.tdr-review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.tdr-review-author {
    display: flex;
    gap: 15px;
    align-items: center;
}

.tdr-author-avatar img {
    border-radius: 50%;
    width: 48px;
    height: 48px;
}

.tdr-author-info strong {
    font-size: 16px;
    color: #1e293b;
}

.tdr-verified-badge {
    display: inline-block;
    background: #dbeafe;
    color: #1e40af;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

.tdr-review-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.tdr-review-date {
    color: #94a3b8;
    font-size: 13px;
}

/* ==========================================
   STARS DISPLAY
   ========================================== */
.tdr-stars {
    display: inline-flex;
    gap: 2px;
}

.tdr-star {
    font-size: 16px;
}

.tdr-star-full {
    color: #f59e0b;
}

.tdr-star-half {
    color: #f59e0b;
    position: relative;
}

.tdr-star-empty {
    color: #cbd5e1;
}

.tdr-stars-large .tdr-star {
    font-size: 24px;
}

.tdr-stars-small .tdr-star {
    font-size: 14px;
}

/* ==========================================
   REVIEW CONTENT
   ========================================== */
.tdr-review-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 10px 0;
}

.tdr-review-content {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* ==========================================
   REVIEW ACTIONS
   ========================================== */
.tdr-review-actions {
    display: flex;
    gap: 15px;
}

.tdr-helpful-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
}

.tdr-helpful-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #475569;
}

.tdr-helpful-btn.voted {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

.tdr-helpful-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.tdr-helpful-icon {
    font-size: 16px;
}

.tdr-helpful-count {
    font-weight: 600;
}

/* ==========================================
   COMPANY RESPONSE
   ========================================== */
.tdr-company-response {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 4px solid #3b82f6;
    border-radius: 8px;
}

.tdr-response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.tdr-response-header strong {
    color: #1e40af;
    font-size: 15px;
}

.tdr-response-date {
    color: #64748b;
    font-size: 13px;
}

.tdr-response-content {
    color: #1e293b;
    line-height: 1.6;
}

/* ==========================================
   NO REVIEWS STATE
   ========================================== */
.tdr-no-reviews {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 16px;
}

/* ==========================================
   NOTIFICATIONS
   ========================================== */
.tdr-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s;
}

.tdr-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.tdr-notification-success {
    border-left: 4px solid #10b981;
    color: #065f46;
}

.tdr-notification-error {
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .tdr-reviews-section {
        padding: 20px;
    }
    
    .tdr-reviews-stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tdr-rating-number {
        font-size: 48px;
    }
    
    .tdr-review-form-wrapper {
        padding: 20px;
    }
    
    .tdr-review-author {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tdr-review-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tdr-notification {
        left: 20px;
        right: 20px;
    }
}