/* ============================================
   Frontend Styles for Advanced Reviews
   ============================================ */

.war-container {
    margin: 20px 0;
}

.war-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.war-header h3 {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.war-description {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* ===== Rating Summary ===== */
.war-rating-summary {
    display: flex;
    gap: 40px;
    padding: 20px 0;
    margin: 10px 0 20px;
    border-bottom: 1px solid #e8e8e8;
    flex-wrap: wrap;
}

.war-rating-average {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.war-average-number {
    font-size: 48px;
    font-weight: 900;
    color: #023d1f;
    line-height: 1;
}

.war-average-stars {
    font-size: 20px;
    letter-spacing: 2px;
    margin: 5px 0;
}

.war-average-stars .star {
    color: #ddd;
}

.war-average-stars .star.filled {
    color: #ffc107;
}

.war-total-reviews {
    font-size: 14px;
    color: #888;
}

.war-rating-distribution {
    flex: 1;
    min-width: 200px;
}

.war-distribution-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.war-distribution-label {
    font-size: 13px;
    font-weight: 700;
    color: #555;
    min-width: 45px;
}

.war-distribution-bar {
    flex: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.war-distribution-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffc107, #ff9800);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.war-distribution-count {
    font-size: 12px;
    color: #888;
    min-width: 30px;
    text-align: left;
}

/* ===== Review Items ===== */
.war-review-item {
    padding: 20px;
    border-radius: 16px;
    background: #fafcfd;
    margin-bottom: 16px;
    border: 1px solid #eef2f5;
    transition: all 0.3s ease;
}

.war-review-item:hover {
    border-color: #023d1f;
    background: #ffffff;
}

.war-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.war-review-author {
    font-size: 15px;
    color: #1a1a1a;
}

.war-review-author strong {
    font-weight: 900;
}

.war-verified {
    display: inline-block;
    background: #e8f5e9;
    color: #023d1f;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    margin-right: 8px;
}

.war-review-date {
    font-size: 12px;
    color: #aaa;
}

.war-review-rating {
    font-size: 16px;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.war-review-rating .star {
    color: #ddd;
}

.war-review-rating .star.filled {
    color: #ffc107;
}

.war-review-content {
    color: #555;
    font-size: 14px;
    line-height: 1.8;
    font-weight: 500;
}

/* ===== Review Actions ===== */
.war-review-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.war-reaction-btn {
    background: none;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

.war-like-btn {
    background: #e8f5e9;
    color: #023d1f;
}

.war-like-btn:hover {
    background: #023d1f;
    color: white;
    transform: scale(1.05);
}

.war-like-btn.active {
    background: #023d1f;
    color: white;
}

.war-dislike-btn {
    background: #fef0f2;
    color: #ee0435;
}

.war-dislike-btn:hover {
    background: #ee0435;
    color: white;
    transform: scale(1.05);
}

.war-dislike-btn.active {
    background: #ee0435;
    color: white;
}

.war-reaction-status {
    font-size: 12px;
    color: #999;
}

.war-reaction-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== No Reviews ===== */
.war-no-reviews {
    text-align: center;
    padding: 40px;
    color: #999;
    background: #fafcfd;
    border-radius: 16px;
    border: 1px dashed #dce1e9;
}

.war-no-reviews p {
    margin: 5px 0;
}

/* ===== Submit Form ===== */
.war-submit-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px dashed #e0e0e0;
}

.war-submit-section h4 {
    font-size: 18px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 20px;
    display: inline-block;
    padding-right: 12px;
    border-right: 4px solid #ee0435;
}

.war-user-info {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 15px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #555;
}

.war-user-info span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.war-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.war-form-group {
    flex: 1 1 200px;
    min-width: 160px;
}

.war-form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #555;
    margin-bottom: 6px;
}

.war-form-group label .required {
    color: #dc3545;
}

.war-form-group label .optional {
    color: #999;
    font-weight: 400;
    font-size: 13px;
}

.war-form-group input,
.war-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.war-form-group input:focus,
.war-form-group textarea:focus {
    outline: none;
    border-color: #ee0435;
    box-shadow: 0 0 0 3px rgba(238, 4, 53, 0.12);
}

.war-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.war-rating-input {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.war-stars-input {
    display: flex;
    flex-direction: row-reverse;
    gap: 5px;
}

.war-stars-input input {
    display: none;
}

.war-stars-input label {
    font-size: 32px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
    margin: 0;
    line-height: 1;
}

.war-stars-input input:checked ~ label {
    color: #ffc107;
}

.war-stars-input label:hover,
.war-stars-input label:hover ~ label {
    color: #ffc107;
}

.war-submit-btn {
    background: #ee0435 !important;
    color: white !important;
    border: none !important;
    padding: 12px 40px !important;
    border-radius: 40px !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-family: inherit !important;
}

.war-submit-btn:hover {
    background: #c0042a !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(238, 4, 53, 0.3);
}

.war-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.war-form-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    display: none;
    font-weight: 600;
}

.war-form-message.success {
    display: block;
    background: #e6f9ed;
    color: #0b5e42;
    border: 1px solid #b8e6cf;
}

.war-form-message.error {
    display: block;
    background: #fee9e7;
    color: #a02c2c;
    border: 1px solid #fad1cd;
}

.war-form-message.info {
    display: block;
    background: #e3f0ff;
    color: #004085;
    border: 1px solid #b8d4f0;
}

.war-login-notice {
    background: #fff8e1;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #ffe0b2;
    text-align: center;
}

.war-login-notice p {
    margin: 0;
    font-size: 16px;
    color: #4a4a4a;
}

.war-login-notice a {
    color: #ee0435;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid #ee0435;
    padding-bottom: 2px;
}

.war-login-notice a:hover {
    color: #c0042a;
    border-bottom-color: #c0042a;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .war-rating-summary {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    
    .war-rating-distribution {
        width: 100%;
        max-width: 300px;
    }
    
    .war-form-row {
        flex-direction: column;
    }
    
    .war-form-group {
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    .war-review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .war-review-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .war-average-number {
        font-size: 36px;
    }
    
    .war-review-item {
        padding: 15px;
    }
    
    .war-stars-input label {
        font-size: 26px;
    }
}