/* ColleaguePulse - Enterprise Blue Design System */

/* CSS Variables - Enterprise Blue Color Palette */
:root {
    /* Primary Blue Color Palette */
    --primary-dark: #25244a;        /* Top nav background */
    --primary-blue: #2c5aa0;        /* Primary actions */
    --secondary-blue: #4a90bb;      /* Secondary elements */
    --light-blue: #e3f2fd;          /* Light backgrounds */
    --accent-blue: #1976d2;         /* Accent elements */
    --blue-1: #2c5aa0;              /* Stat card primary */
    --blue-2: #3672b3;              /* Stat card medium */
    --blue-3: #4a90bb;              /* Stat card secondary */
    --blue-4: #5ba3cc;              /* Stat card light */
    
    /* Supporting Colors */
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --dark-gray: #343a40;
    --border-color: #dee2e6;
    
    /* Status Colors */
    --success: #198754;
    --warning: #fd7e14;
    --danger: #dc3545;
    --info: #0dcaf0;
    
    /* Shadows and Effects */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --border-radius: 0.375rem;
    --border-radius-lg: 0.5rem;

    /* Legacy variables for backward compatibility */
    --primary-color: var(--primary-blue);
    --secondary-color: var(--secondary-blue);
    --success-color: var(--success);
    --danger-color: var(--danger);
    --warning-color: var(--warning);
    --info-color: var(--info);
    --light-color: var(--light-gray);
    --dark-color: var(--dark-gray);
}

/* Global Styles */
html {
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-gray);
    color: var(--dark-gray);
    margin: 0;
    padding-top: 70px;
    margin-bottom: 60px;
    line-height: 1.6;
}

/* Top Navigation - Primary */
.navbar {
    background-color: var(--primary-dark) !important;
    box-shadow: var(--shadow);
    height: 70px;
    margin-bottom: 4px;
    z-index: 1030;  /* Ensure navbar stays above page content */
}

/* Extra specificity for fixed navbar */
.navbar.fixed-top {
    z-index: 1030 !important;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--white) !important;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.8rem 1rem !important;
    border-radius: var(--border-radius);
    margin: 0 0.25rem;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white) !important;
}

.navbar-nav .nav-link.active {
    background-color: var(--primary-blue);
    color: var(--white) !important;
}

/* Card Components - Boxy Enterprise Style */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
    background-color: var(--white);
}

.card:hover {
    box-shadow: var(--shadow);
}

.card-header {
    background-color: var(--light-blue);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: var(--primary-blue);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0 !important;
}

.card-body {
    padding: 1.5rem;
}

/* Button Components */
.btn {
    font-weight: 500;
    border-radius: var(--border-radius);
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--secondary-blue);
    border-color: var(--secondary-blue);
    color: var(--white);
}

.btn-outline-primary {
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-outline-primary:hover {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
}

/* Smaller buttons for question management */
.btn-group .btn-sm {
    padding: 0.2rem 0.4rem;
    font-size: 0.8rem;
    line-height: 1.3;
}

/* Form Components */
.form-control {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

.form-select {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.form-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
}

/* Table Components */
.table {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: var(--white);
    width: 100%;
    min-width: 100%;
}

.table thead th {
    background-color: var(--primary-blue);
    color: var(--white);
    font-weight: 600;
    border: none;
    padding: 1rem;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: var(--light-blue);
}

.table tbody td {
    padding: 1rem;
    border-color: var(--border-color);
    vertical-align: middle;
}

/* Table Record Links */
.record-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-block;
}

.record-link:hover {
    color: var(--accent-blue);
    text-decoration: underline;
    transform: translateX(2px);
}

.record-link:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Badge Components */
.badge {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
}

.badge.bg-primary {
    background-color: var(--primary-blue) !important;
}

.badge.bg-success {
    background-color: var(--success) !important;
}

.badge.bg-warning {
    background-color: var(--warning) !important;
}

.badge.bg-danger {
    background-color: var(--danger) !important;
}

/* Alert Components */
.alert {
    border-radius: var(--border-radius-lg);
    border: none;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
}

.alert-primary {
    background-color: var(--light-blue);
    color: var(--primary-blue);
    border-left: 4px solid var(--primary-blue);
}

.alert-info {
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.1) 0%, rgba(13, 202, 240, 0.05) 100%);
    color: #0c5460;
}

.alert-success {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.1) 0%, rgba(25, 135, 84, 0.05) 100%);
    color: #155724;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(253, 126, 20, 0.1) 0%, rgba(253, 126, 20, 0.05) 100%);
    color: #856404;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.05) 100%);
    color: #721c24;
}

/* Dropdown Components */
.dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 0.5rem 0;
    z-index: 1080 !important;  /* Increased to ensure dropdowns appear above all content */
    min-width: 300px;
}

.dropdown-item {
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--light-blue);
    color: var(--primary-blue);
}

.dropdown-item.active {
    background-color: var(--primary-blue);
    color: var(--white);
}

.dropdown-toggle {
    z-index: 1070;  /* Increased to work with higher dropdown menu z-index */
}

/* Recent Surveys Dropdown Styling */
.dropdown-header {
    padding: 0.75rem 1.25rem;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    color: var(--primary-blue);
    background-color: var(--light-blue);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-menu .text-truncate {
    vertical-align: middle;
}

.dropdown-menu small {
    font-size: 0.75rem;
    opacity: 0.8;
}

.dropdown-item .text-muted {
    color: var(--medium-gray) !important;
}

/* Survey dropdown item enhancements */
.dropdown-menu li > a.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-menu li > a.dropdown-item:hover {
    transform: translateX(2px);
}

/* No surveys message styling */
.dropdown-item.text-muted:hover {
    background-color: transparent;
    cursor: default;
    transform: none;
}

/* Nested Dropdown Submenu Styles */
.dropdown-menu .dropend {
    position: relative;
}

.dropdown-menu .dropend > .dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-menu .dropend > .dropdown-toggle::after {
    margin-left: auto;
    border-left: 0.3em solid;
    border-top: 0.3em solid transparent;
    border-bottom: 0.3em solid transparent;
    border-right: 0;
}

.dropdown-menu .dropend > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-left: 0;
    margin-top: -0.5rem;
    min-width: 200px;
}

/* Show submenu on hover */
.dropdown-menu .dropend:hover > .dropdown-menu {
    display: block;
}

/* Progress Components */
.progress {
    height: 1rem;
    border-radius: var(--border-radius);
    background-color: var(--light-gray);
}

.progress-bar {
    background-color: var(--primary-blue);
    border-radius: var(--border-radius);
    transition: width 0.3s ease;
}

/* Modal Components */
.modal-content {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background-color: var(--primary-blue);
    color: var(--white);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Stats Cards */
.stats-card {
    background: linear-gradient(135deg, var(--white) 0%, var(--light-blue) 100%);
    border-left: 4px solid var(--primary-blue);
}

.stats-card .stats-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-blue);
}

.stats-card .stats-label {
    color: var(--medium-gray);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
}

/* Tab Enhancements */
.nav-tabs {
    border-bottom: 2px solid var(--border-color);
}

.nav-tabs .nav-link {
    border: none;
    color: var(--medium-gray);
    font-weight: 500;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    background: transparent;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link.active {
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    box-shadow: var(--shadow-sm);
}

.nav-tabs .nav-link:hover:not(.active) {
    background: var(--light-blue);
    color: var(--primary-blue);
    border: 1px solid var(--border-color);
}

/* Utility Classes */
.text-primary {
    color: var(--primary-blue) !important;
}

.bg-primary {
    background-color: var(--primary-blue) !important;
}

.border-primary {
    border-color: var(--primary-blue) !important;
}

/* Focus States for Accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--primary-blue);
}

/* Footer Styling */
.footer {
    background: var(--dark-gray);
    color: white !important;
    padding: 0.5rem 0;
    margin-top: 150px;
}

.footer * {
    color: white !important;
}

.footer a {
    color: white !important;
    text-decoration: none;
}

.footer a:hover {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: underline;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border {
    color: var(--primary-blue);
}

/* Container and Layout */
.container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

.table-responsive {
    width: 100%;
    border-radius: var(--border-radius-lg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .btn-group .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.875rem;
    }
}

@media (min-width: 1200px) {
    .modal-xl {
        max-width: 90vw;
    }
    
    .modal-lg {
        max-width: 70vw;
    }
}

@media (min-width: 992px) {
    .card {
        margin-bottom: 1.5rem;
    }
}

@media (min-width: 1400px) {
    .col-xxl-2 {
        flex: 0 0 auto;
        width: 16.66666667%;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.shadow-custom {
    box-shadow: var(--shadow);
}

/* Survey Taking Interface Styles */
.survey-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    overflow: hidden;
}

.survey-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.survey-header h1 {
    margin: 0;
    font-weight: 600;
}

.survey-body {
    padding: 2rem;
}

.survey-info {
    background: var(--light-blue);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.survey-info h6 {
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

/* Question Cards */
.question-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.question-number {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.question-text {
    margin-left: 0px;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

.question-help-text {
    margin-left: 3rem;
    margin-bottom: 1rem;
    color: var(--medium-gray);
    font-size: 0.9rem;
    font-style: italic;
}

/* Five-Point Scoring Styles */
.five-point-scoring {
    margin-left: 3rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.scoring-option {
    margin: 0;
}

.scoring-option .form-check-input {
    display: none;
}

.scoring-label {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    width: 100%;
}

.scoring-label:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.scoring-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #f0f0f0;
    font-weight: 700;
    margin-right: 1rem;
    flex-shrink: 0;
}

.scoring-text {
    flex: 1;
}

/* Color coding for 5-point scores */
.score-very-positive {
    border-color: var(--success);
}

.score-very-positive:hover {
    background-color: rgba(25, 135, 84, 0.1);
    border-color: var(--success);
}

.score-very-positive .scoring-number {
    background-color: var(--success);
    color: white;
}

.score-positive {
    border-color: #52c41a;
}

.score-positive:hover {
    background-color: rgba(82, 196, 26, 0.1);
    border-color: #52c41a;
}

.score-positive .scoring-number {
    background-color: #52c41a;
    color: white;
}

.score-neutral {
    border-color: var(--warning);
}

.score-neutral:hover {
    background-color: rgba(253, 126, 20, 0.1);
    border-color: var(--warning);
}

.score-neutral .scoring-number {
    background-color: var(--warning);
    color: white;
}

.score-negative {
    border-color: #ff7043;
}

.score-negative:hover {
    background-color: rgba(255, 112, 67, 0.1);
    border-color: #ff7043;
}

.score-negative .scoring-number {
    background-color: #ff7043;
    color: white;
}

.score-very-negative {
    border-color: var(--danger);
}

.score-very-negative:hover {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: var(--danger);
}

.score-very-negative .scoring-number {
    background-color: var(--danger);
    color: white;
}

/* Selected state for scoring options */
.scoring-option input:checked + .scoring-label {
    border-width: 3px;
    font-weight: 600;
}

.scoring-option input:checked + .score-very-positive {
    background-color: rgba(25, 135, 84, 0.1);
    border-color: var(--success);
}

.scoring-option input:checked + .score-positive {
    background-color: rgba(82, 196, 26, 0.1);
    border-color: #52c41a;
}

.scoring-option input:checked + .score-neutral {
    background-color: rgba(253, 126, 20, 0.1);
    border-color: var(--warning);
}

.scoring-option input:checked + .score-negative {
    background-color: rgba(255, 112, 67, 0.1);
    border-color: #ff7043;
}

.scoring-option input:checked + .score-very-negative {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: var(--danger);
}

/* Progress Bar */
.progress-container {
    background: var(--primary-blue);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    margin-bottom: 2rem;
}

/* Rating Buttons */
.btn-rating {
    margin: 0 5px;
    min-width: 50px;
    font-weight: 600;
    border: 2px solid #e0e0e0;
}

.btn-rating:hover {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.btn-rating.active {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* Submit Button */
.btn-submit {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    color: white;
    padding: 12px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-start {
    background: linear-gradient(135deg, var(--secondary-blue) 0%, var(--accent-blue) 100%);
    color: white;
    padding: 12px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border: none;
    border-radius: 30px;
}

/* Mobile Phone Preview Styles */
.mobile-frame {
    width: 100%;
    max-width: 427px; /* Increased by ~33% from 320px */
    margin: 0 auto;
    background: #333;
    border-radius: 25px;
    padding: 20px 8px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.mobile-frame::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #666;
    border-radius: 2px;
}

.mobile-screen {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    height: 800px; /* Increased by ~33% from 600px */
    position: relative;
    border: 1px solid var(--border-color);
}

/* Ensure iframe scaling works properly within mobile screen */
.mobile-screen iframe {
    display: block;
}

.mobile-content {
    height: 100%;
    overflow-y: auto;
    padding: 15px;
    font-size: 0.8rem;
}

.mobile-content::-webkit-scrollbar {
    width: 4px;
}

.mobile-content::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 2px;
}

.mobile-content::-webkit-scrollbar-thumb {
    background: var(--medium-gray);
    border-radius: 2px;
}

.mobile-content::-webkit-scrollbar-thumb:hover {
    background: var(--dark-gray);
}

.mobile-survey-header {
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.mobile-survey-header h6 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 5px;
}

.mobile-question {
    background: var(--light-gray);
    border-radius: var(--border-radius-lg);
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
}

.mobile-question-number {
    display: inline-block;
    background: var(--primary-blue);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.mobile-question-text {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--dark-gray);
    margin-bottom: 10px;
    line-height: 1.4;
}

.mobile-textarea {
    width: 100%;
    font-size: 0.7rem;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    resize: none;
    background: var(--white);
}

.mobile-radio-option {
    margin-bottom: 6px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
}

.mobile-radio-option input[type="radio"] {
    width: 12px;
    height: 12px;
    margin-right: 8px;
}

.mobile-rating {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.mobile-yesno {
    display: flex;
    gap: 8px;
}

.mobile-rating-btn {
    background: var(--primary-blue);
    color: white;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 500;
    display: inline-block;
    text-align: center;
    min-width: 24px;
}

.mobile-submit {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.mobile-submit-btn {
    background: var(--success);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.mobile-empty {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile-scaled 5-point scoring */
.mobile-scale .scoring-label {
    padding: 6px 8px;
    font-size: 0.75rem;
}

.mobile-scale .scoring-number {
    width: 18px;
    height: 18px;
    line-height: 18px;
    font-size: 0.65rem;
    margin-right: 6px;
}

.mobile-scale .scoring-text {
    font-size: 0.75rem;
}

/* Question Management Preview Styles */
.answer-preview {
    background: var(--light-gray);
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 12px;
    position: relative;
}

.answer-preview::before {
    content: 'Preview';
    position: absolute;
    top: -8px;
    right: 8px;
    background: var(--medium-gray);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}

.preview-field {
    opacity: 0.8;
    cursor: not-allowed;
}

.preview-options {
    opacity: 0.8;
}

.preview-option {
    margin-bottom: 4px;
}

.preview-label {
    cursor: not-allowed;
    opacity: 0.8;
    font-size: 0.9rem;
}

.preview-rating-btn {
    cursor: not-allowed;
    opacity: 0.8;
    pointer-events: none;
    min-width: 40px;
}

.rating-preview {
    opacity: 0.8;
}

/* Ensure preview elements are disabled */
.answer-preview .scoring-option input {
    cursor: not-allowed;
}

.answer-preview .scoring-label {
    cursor: not-allowed;
}

/* Fix checkbox positioning in dropdown menus */
.dropdown-menu .form-check {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.dropdown-menu .form-check-input {
    margin-left: 0;
    margin-right: 0.5rem;
}

.dropdown-menu .form-check-label {
    margin-left: 0;
    padding-left: 0;
    cursor: pointer;
}

/* Specific fix for passThroughDropdown */
#passThroughDropdown {
    position: relative;
    z-index: 1070;  /* Increased to match other dropdown toggles */
}

#passThroughDropdown + .dropdown-menu {
    z-index: 1080 !important;  /* Increased to match other dropdown menus */
}

/* Enhanced Rating Styles - Colored Rating Buttons */
.btn-rating-very-negative {
    background-color: var(--danger);
    border-color: var(--danger);
    color: white;
    margin: 0 3px;
    min-width: 50px;
    font-weight: 600;
}

.btn-rating-very-negative:hover,
.btn-rating-very-negative:focus,
.btn-rating-very-negative.active {
    background-color: #c82333;
    border-color: #bd2130;
    color: white;
}

.btn-rating-negative {
    background-color: var(--warning);
    border-color: var(--warning);
    color: white;
    margin: 0 3px;
    min-width: 50px;
    font-weight: 600;
}

.btn-rating-negative:hover,
.btn-rating-negative:focus,
.btn-rating-negative.active {
    background-color: #e8680d;
    border-color: #dc5f0a;
    color: white;
}

.btn-rating-neutral {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
    margin: 0 3px;
    min-width: 50px;
    font-weight: 600;
}

.btn-rating-neutral:hover,
.btn-rating-neutral:focus,
.btn-rating-neutral.active {
    background-color: #e0a800;
    border-color: #d39e00;
    color: #212529;
}

.btn-rating-positive {
    background-color: #20c997;
    border-color: #20c997;
    color: white;
    margin: 0 3px;
    min-width: 50px;
    font-weight: 600;
}

.btn-rating-positive:hover,
.btn-rating-positive:focus,
.btn-rating-positive.active {
    background-color: #1ca085;
    border-color: #19926c;
    color: white;
}

.btn-rating-very-positive {
    background-color: var(--success);
    border-color: var(--success);
    color: white;
    margin: 0 3px;
    min-width: 50px;
    font-weight: 600;
}

.btn-rating-very-positive:hover,
.btn-rating-very-positive:focus,
.btn-rating-very-positive.active {
    background-color: #218838;
    border-color: #1e7e34;
    color: white;
}

/* Rating groups for 1–10 colored buttons */
.rating-buttons .btn {
    margin: 2px;
}

.rating-buttons .btn.active {
    outline: 2px solid var(--success);
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

/* Rating Dot for buttons without numbers */
.rating-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: currentColor;
    border-radius: 50%;
}

/* Rating Slider Styles */
.rating-slider-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
}

.rating-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, var(--danger) 0%, var(--warning) 25%, #ffc107 50%, #20c997 75%, var(--success) 100%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.rating-slider::-webkit-slider-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--primary-blue);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.rating-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--primary-blue);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.slider-value-display {
    margin-top: 15px;
    padding: 8px 16px;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.slider-value-text {
    font-size: 0.95rem;
    color: var(--dark-gray);
}

/* Rating container enhancements */
.rating-container {
    padding: 15px;
    margin: 10px 0;
}

.rating-container[data-style="colored-buttons"] {
    background: linear-gradient(45deg, rgba(220,53,69,0.05) 0%, rgba(25,135,84,0.05) 100%);
    border-radius: var(--border-radius);
    border: 1px solid rgba(0,0,0,0.1);
}

.rating-container[data-style="slider"] {
    background: var(--light-gray);
    border-radius: var(--border-radius);
    border: 1px solid rgba(0,0,0,0.1);
}

/* Print Styles */
@media print {
    .navbar,
    .footer {
        display: none;
    }
    
    body {
        padding-top: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}

/* Form Floating Placeholder Fix */
.form-floating > .form-control-plaintext::placeholder, 
.form-floating > .form-control::placeholder {
    color: var(--medium-gray);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, 
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Dashboard Stat Shades */
.stat-blue-1 { background: var(--blue-1) !important; color: var(--white) !important; }
.stat-blue-2 { background: var(--blue-2) !important; color: var(--white) !important; }
.stat-blue-3 { background: var(--blue-3) !important; color: var(--white) !important; }
.stat-blue-4 { background: var(--blue-4) !important; color: var(--white) !important; }

/* Top Right Button Spacing Fix */
/* Adds proper spacing for buttons positioned immediately below the navigation bar */
.btn-top-right {
    margin-top: 4px !important;
}

/* NOTE (2025-09): Previous implementation applied margin-top:4px broadly to:
    .d-flex:first-child .btn:last-child,
    .d-flex .btn[href*="Create"],
    .d-flex .btn[href*="Add"],
    .text-end .btn:first-child
    This caused the final button inside many .btn-group toolbars to sit lower (vertical misalignment)
    because only that button received extra top margin. Removed to restore consistent alignment.
    If spacing beneath navbar is required, apply .btn-top-right (or a Bootstrap utility like mt-1)
    directly to the specific button container instead of using broad pattern selectors. */