/* Rating System Styles */

.rating-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.rating-form {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 20px;
}

/* Appointment Summary */
.appointment-summary {
    margin-bottom: 40px;
}

.appointment-summary h2 {
    color: var(--dark);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.summary-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
}

.specialist-info {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.specialist-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    border: 3px solid var(--primary);
}

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

.specialist-details h3 {
    margin: 0 0 5px 0;
    color: var(--dark);
    font-size: 1.2rem;
}

.specialist-details p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.appointment-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 0.9rem;
}

.detail-item i {
    color: var(--primary);
    width: 16px;
}

/* Rating Categories */
.rating-categories {
    margin-bottom: 40px;
}

.rating-categories h2 {
    color: var(--dark);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.rating-categories p {
    color: #666;
    margin-bottom: 30px;
}

.rating-category {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.category-header h3 {
    margin: 0 0 5px 0;
    color: var(--dark);
    font-size: 1.1rem;
}

.category-header p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 0.9rem;
}

/* Star Rating */
.star-rating {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.star-rating.large {
    gap: 8px;
    margin-bottom: 15px;
}

.star-rating i {
    font-size: 1.5rem;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.star-rating.large i {
    font-size: 2rem;
}

.star-rating i:hover,
.star-rating i.active {
    color: #ffc107;
    transform: scale(1.1);
}

.star-rating i.hover {
    color: #ffc107;
}

.rating-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.overall-label {
    font-size: 1.1rem;
    color: var(--dark);
    font-weight: 600;
    text-align: center;
    margin-top: 10px;
}

/* Overall Rating */
.overall-rating {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
}

.overall-rating h2 {
    margin: 0 0 20px 0;
    font-size: 1.5rem;
}

.overall-stars {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.overall-label {
    color: white;
    margin-top: 15px;
}

/* Review Text */
.review-text {
    margin-bottom: 40px;
}

.review-text h2 {
    color: var(--dark);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.review-text p {
    color: #666;
    margin-bottom: 15px;
}

.review-text textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.review-text textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Additional Questions */
.additional-questions {
    margin-bottom: 40px;
}

.additional-questions h2 {
    color: var(--dark);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.question-group {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.question-label {
    display: block;
    margin-bottom: 15px;
    color: var(--dark);
    font-weight: 500;
    font-size: 1rem;
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
}

.radio-option input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.radio-option:hover {
    color: var(--dark);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
}

.checkbox-option input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.checkbox-option:hover {
    color: var(--dark);
}

/* Submit Section */
.submit-section {
    text-align: center;
    padding: 30px;
    background: #f8fafc;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
}

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

.submit-note {
    margin-top: 15px;
    color: #666;
    font-size: 0.9rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 60px 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.success-content i {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 20px;
}

.success-content h2 {
    color: var(--dark);
    margin-bottom: 15px;
    font-size: 2rem;
}

.success-content p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.success-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Rating Labels */
.rating-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.8rem;
    color: #666;
}

.rating-labels span {
    text-align: center;
    flex: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rating-container {
        padding: 15px;
    }
    
    .rating-form {
        padding: 20px;
    }
    
    .specialist-info {
        flex-direction: column;
        text-align: center;
    }
    
    .specialist-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .appointment-details {
        grid-template-columns: 1fr;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .success-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .star-rating.large i {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .rating-form {
        padding: 15px;
    }
    
    .overall-rating {
        padding: 20px;
    }
    
    .star-rating i {
        font-size: 1.2rem;
    }
    
    .star-rating.large i {
        font-size: 1.3rem;
    }
}

/* Animation for star rating */
@keyframes starGlow {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.star-rating i.animate {
    animation: starGlow 0.3s ease;
}

/* Progress indicator */
.rating-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    z-index: 1000;
}

.rating-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
    width: 0%;
}

/* Rating validation */
.rating-category.invalid {
    border-color: var(--error);
    background: #fef2f2;
}

.rating-category.valid {
    border-color: var(--success);
    background: #f0fdf4;
}

/* Loading state */
.rating-form.loading {
    opacity: 0.7;
    pointer-events: none;
}

.rating-form.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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