/* Review Form Specific Styles */
.review-main {
    background: #f8f9fa;
    min-height: calc(100vh - 140px);
    padding: 2rem 0;
}

.review-header {
    text-align: center;
    margin-bottom: 3rem;
}

.review-header h1 {
    font-size: 2.5rem;
    color: #1a73e8;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.review-header p {
    font-size: 1.1rem;
    color: #5f6368;
}

.review-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.review-form {
    padding: 2rem;
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e8eaed;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h3 {
    font-size: 1.4rem;
    color: #202124;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #3c4043;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #dadce0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6b7280;
    box-shadow: 0 0 0 4px rgba(107, 114, 128, 0.1);
}

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

.required {
    color: #ea4335;
}

/* Rating Section */
.rating-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e8eaed;
}

.rating-card h3 {
    color: #1a73e8;
    margin-bottom: 2rem;
}

.rating-item {
    margin-bottom: 2rem;
}

.rating-item label {
    font-weight: 600;
    color: #202124;
    margin-bottom: 1rem;
}

.rating-scale {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.scale-buttons {
    display: flex;
    gap: 8px;
}

.scale-btn {
    width: 50px;
    height: 50px;
    border: 2px solid #dadce0;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scale-btn:hover {
    border-color: #1a73e8;
    background: #f8f9fa;
}

.scale-btn.active {
    background: #1a73e8;
    border-color: #1a73e8;
    color: white;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #5f6368;
    margin-top: 0.5rem;
}

/* Yes/No Buttons */
.yes-no-buttons {
    display: flex;
    gap: 1rem;
}

.yn-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 12px 32px;
    border: 2px solid #dadce0;
    border-radius: 24px;
    background: white;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 140px;
}

.yn-btn:hover {
    border-color: #1a73e8;
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.15);
}

.yn-btn.active {
    background: #1a73e8;
    border-color: #1a73e8;
    color: white;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.yn-emoji {
    font-size: 1.25rem;
    font-weight: bold;
    line-height: 1;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.yn-btn.active .yn-emoji {
    opacity: 1;
    transform: scale(1.1);
}

.yn-btn[data-value="yes"]:hover .yn-emoji {
    color: #34a853;
}

.yn-btn[data-value="no"]:hover .yn-emoji {
    color: #ea4335;
}

.yn-btn[data-value="yes"].active {
    background: #34a853;
    border-color: #34a853;
}

.yn-btn[data-value="no"].active {
    background: #ea4335;
    border-color: #ea4335;
}

/* Remove old circle styles - kept for backwards compatibility but hidden */
.yn-circle {
    display: none;
}

/* Tags Section */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.tag-btn {
    padding: 8px 16px;
    border: 2px solid #dadce0;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tag-btn:hover {
    border-color: #1a73e8;
    background: #f8f9fa;
}

.tag-btn.selected {
    background: #1a73e8;
    border-color: #1a73e8;
    color: white;
}

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

.btn-add-tag {
    padding: 8px 16px;
    background: #34a853;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    margin-left: 0.5rem;
    margin-top: 1rem;
    transition: background 0.2s ease;
}

.btn-add-tag:hover {
    background: #2d8f47;
}

.selected-tags-info {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #e8f0fe;
    border-radius: 8px;
    color: #1a73e8;
    font-weight: 500;
    text-align: center;
}

/* Character Count */
.character-count {
    text-align: right;
    font-size: 0.85rem;
    color: #5f6368;
    margin-top: 0.5rem;
}

/* Guidelines */
.guidelines {
    background: #fff3cd;
    border: 1px solid #ffecb5;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.guidelines h4 {
    color: #996633;
    margin-bottom: 0.5rem;
}

.guidelines ul {
    margin: 0;
    padding-left: 1.2rem;
}

.guidelines li {
    color: #996633;
    margin-bottom: 0.25rem;
}

.guidelines a {
    color: #1a73e8;
    text-decoration: none;
}

.guidelines a:hover {
    text-decoration: underline;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e8eaed;
}

.btn-secondary {
    padding: 12px 24px;
    border: 2px solid #dadce0;
    border-radius: 8px;
    background: white;
    color: #3c4043;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: #9aa0a6;
    background: #f8f9fa;
}

.btn-primary {
    padding: 12px 24px;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s ease;
}

.btn-primary:hover {
    background: #1557b0;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkmark {
    font-size: 1.2rem;
}

/* Custom University/Professor Fields */
#custom-university-group,
#custom-professor-group,
#custom-department-group,
#custom-course-group {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Description */
.form-description {
    color: #5f6368;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 768px) {
    .review-main {
        padding: 1rem 0;
    }

    .review-header h1 {
        font-size: 1.4rem;
    }

    .review-header p {
        font-size: 0.9rem;
    }

    .form-section h3 {
        font-size: 1rem;
    }

    .review-form-container {
        margin: 0 1rem;
        border-radius: 12px;
    }

    .review-form {
        padding: 1.5rem;
    }

    .scale-buttons {
        justify-content: space-between;
    }

    .scale-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-secondary,
    .btn-primary {
        width: 100%;
        text-align: center;
    }

    .tags-container {
        gap: 0.5rem;
    }

    .tag-btn {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .review-header h1 {
        font-size: 1.2rem;
    }

    .review-header p {
        font-size: 0.85rem;
    }

    .form-section h3 {
        font-size: 0.9rem;
    }

    .review-form {
        padding: 1rem;
    }

    .yes-no-buttons {
        flex-direction: column;
    }

    .yn-btn {
        justify-content: center;
        width: 100%;
    }

    .course-search-container {
        flex-direction: column;
    }

    .course-dropdown {
        position: static;
        box-shadow: none;
        border: 1px solid #dadce0;
        border-radius: 8px;
        margin-top: 0.5rem;
    }
}

/* Course Search Specific Styles */
.course-search-container {
    position: relative;
    display: flex;
    flex-direction: column;
}

.course-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dadce0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
}

.course-results {
    padding: 0;
}

.course-result-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

.course-result-item:last-child {
    border-bottom: none;
}

.course-result-item:hover {
    background-color: #f8f9fa;
}

.course-result-item.selected {
    background-color: #e8f0fe;
}

.course-result-code {
    font-weight: 600;
    color: #1a73e8;
    font-size: 0.9rem;
}

.course-result-name {
    color: #5f6368;
    font-size: 0.85rem;
    margin-top: 2px;
}

.course-result-meta {
    color: #9aa0a6;
    font-size: 0.75rem;
    margin-top: 2px;
}

.course-help-text {
    margin-top: 8px;
}

.course-help-text small {
    color: #5f6368;
    font-size: 0.8rem;
    line-height: 1.4;
}

.course-search-loading {
    padding: 16px;
    text-align: center;
    color: #5f6368;
    font-size: 0.9rem;
}

.course-no-results {
    padding: 16px;
    text-align: center;
    color: #5f6368;
    font-size: 0.9rem;
}

.course-add-new {
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-top: 1px solid #e8eaed;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.course-add-new:hover {
    background-color: #e8f0fe;
}

.course-add-new-text {
    color: #1a73e8;
    font-weight: 500;
    font-size: 0.9rem;
}

.course-add-new-help {
    color: #5f6368;
    font-size: 0.8rem;
    margin-top: 2px;
}

/* Popular Courses Styles */
.course-popular-header {
    padding: 12px 16px 8px 16px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e8eaed;
}

.course-popular-title {
    font-weight: 600;
    color: #1a73e8;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.course-search-hint {
    padding: 12px 16px;
    background-color: #f1f3f4;
    border-top: 1px solid #e8eaed;
    text-align: center;
}

.course-hint-text {
    color: #5f6368;
    font-size: 0.8rem;
    font-style: italic;
}

/* University Select Wrapper - Custom Display */
/* Professor search container - matching course search style */
.professor-search-container {
    position: relative;
}

.professor-search-container input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #dadce0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: #fff;
}

.professor-search-container input[type="text"]:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.professor-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dadce0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
}

.professor-results {
    padding: 8px 0;
}

.professor-result-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    display: flex;
    flex-direction: column;
}

.professor-result-item:hover {
    background-color: #f1f3f4;
}

.professor-result-name {
    font-weight: 500;
    color: #202124;
    margin-bottom: 2px;
}

.professor-result-department {
    font-size: 0.875rem;
    color: #5f6368;
}

.professor-help-text {
    margin-top: 6px;
}

.professor-help-text small {
    color: #5f6368;
    font-size: 0.875rem;
}

/* Auto-suggestion boxes */
.suggestion-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 2px solid #1a73e8;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.15);
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestion-header {
    color: #1a73e8;
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.suggested-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.suggested-tag {
    background: white;
    color: #1a73e8;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 2px solid #1a73e8;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.suggested-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.suggested-review-text {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    line-height: 1.6;
    color: #202124;
    font-size: 0.95rem;
    border-left: 4px solid #1a73e8;
}

/* AI Badge Styling */
.ai-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

/* AI Loading Animation */
.ai-loading {
    display: inline-block;
    color: #1a73e8;
    font-weight: 500;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}


.btn-apply-suggestions,
.btn-dismiss-suggestions {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    margin-right: 0.75rem;
}

.btn-apply-suggestions {
    background: #1a73e8;
    color: white;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.btn-apply-suggestions:hover {
    background: #1557b0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.4);
}

.btn-dismiss-suggestions {
    background: white;
    color: #5f6368;
    border: 2px solid #dadce0;
}

.btn-dismiss-suggestions:hover {
    background: #f1f3f4;
    border-color: #5f6368;
}

/* Dark mode support for suggestion boxes */
[data-theme="dark"] .suggestion-box {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d1b3d 100%);
    border-color: #4a8fe7;
}

[data-theme="dark"] .suggestion-header {
    color: #64b5f6;
}

[data-theme="dark"] .suggested-tag {
    background: #1e3a5f;
    color: #64b5f6;
    border-color: #4a8fe7;
}

[data-theme="dark"] .suggested-review-text {
    background: #1a1a2e;
    color: #e0e0e0;
    border-left-color: #4a8fe7;
}

[data-theme="dark"] .btn-apply-suggestions {
    background: #4a8fe7;
}

[data-theme="dark"] .btn-apply-suggestions:hover {
    background: #357abd;
}

[data-theme="dark"] .btn-dismiss-suggestions {
    background: #2a2a3e;
    color: #b0b0b0;
    border-color: #4a4a5e;
}

[data-theme="dark"] .btn-dismiss-suggestions:hover {
    background: #3a3a4e;
    border-color: #5a5a6e;
}

/* Course Suggestion Box Styles */
.course-suggestion-box {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #e8f5e9;
    border: 2px solid #66bb6a;
    border-radius: 8px;
    animation: slideDown 0.3s ease-out;
}

.course-suggestion-box .suggestion-header {
    margin-bottom: 0.75rem;
    color: #2e7d32;
    font-size: 0.95rem;
}

.course-suggestion-box .suggestion-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.btn-course-suggestion {
    padding: 0.5rem 1rem;
    background: #4caf50;
    color: white;
    border: 2px solid #4caf50;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.btn-course-suggestion:hover {
    background: #45a049;
    border-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.btn-dismiss-course-suggestions {
    padding: 0.4rem 0.8rem;
    background: transparent;
    color: #5f6368;
    border: 1px solid #dadce0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-dismiss-course-suggestions:hover {
    background: #f1f3f4;
    border-color: #5f6368;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark theme support for course suggestions */
[data-theme="dark"] .course-suggestion-box {
    background: #1e3a2e;
    border-color: #4caf50;
}

[data-theme="dark"] .course-suggestion-box .suggestion-header {
    color: #81c784;
}

[data-theme="dark"] .btn-course-suggestion {
    background: #388e3c;
    border-color: #388e3c;
}

[data-theme="dark"] .btn-course-suggestion:hover {
    background: #2e7d32;
    border-color: #2e7d32;
}

[data-theme="dark"] .btn-dismiss-course-suggestions {
    background: #2a2a3e;
    color: #b0b0b0;
    border-color: #4a4a5e;
}

[data-theme="dark"] .btn-dismiss-course-suggestions:hover {
    background: #3a3a4e;
    border-color: #5a5a6e;
}