/* Size for brand */
nav .navbar-brand
{
    font-size: xx-large;
}

/* Colors for brand */
nav .navbar-brand .blue
{
    color: #537fbe;
}
nav .navbar-brand .red
{
    color: #ea433b;
}
nav .navbar-brand .yellow
{
    color: #f5b82e;
}
nav .navbar-brand .green
{
    color: #2e944b;
}
.navbar{
    position: sticky;
    top:0;
}



body {
    background-color: #fff;
    color: #212529;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
    text-align: left;
}

.container {
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
    text-align: center;
    width: 90%;
}

.header {
    background-color: #477bff;
    color: #fff;
    margin-bottom: 2rem;
    padding: 2rem 1rem;
    text-align: center;
}

.section {
    padding-bottom: 1rem;
    padding-left: 2rem;
    padding-right: 2rem;
    padding-top: 0.5rem;
    background-color: white;
}


h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 48px;
}

button, input[type="submit"] {
    background-color: #d9edff;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    padding: 0.375rem 0.75rem;
    text-align: center;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    vertical-align: middle;
}

input[type="text"], input[type="number"] {
    line-height: 1.8;
    width: 25%;
}

input[type="text"]:hover, input[type="number"]:hover {
    background-color: #f5f5f5;
    transition: color 2s ease-in-out, background-color 0.15s ease-in-out;
}

table {
    background-color: transparent;
    margin-bottom: 1rem;
    width: 100%;
}

table th,
table td {
    padding: 0.75rem;
    vertical-align: middle;
}

tbody tr:nth-of-type(odd) {
    background-color: rgb(179, 208, 255, 0.3)
}

.inline-block {
    display: inline-block;
}

.w-300 {
    width: 25%;
}

.question-box{
    margin-left: auto;
    margin-right: auto;
    margin-top: auto;
    margin-bottom: 5px;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 10px;
    padding-bottom: 10px;
    text-align: left;
    width: 80%;
    border: 2px solid rgb(66, 0, 0);
    border-radius:10px ;
}

.sticky{
    position:sticky;
    top:75.5px;
}

.question{
    border-bottom: 1px solid gray;
}

.canvas {
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;  
    align-items: center; 
}
canvas{
    display: block;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
  }
  
  .switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ff4747;
    -webkit-transition: .4s;
    transition: .4s;
  }
  
  .slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
  }
  
  input:checked + .slider {
    background-color: #32fc50;
  }
  
  input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
  }
  
  input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
  }
  
  .slider.round {
    border-radius: 34px;
  }
  
  .slider.round:before {
    border-radius: 50%;
  }

/* Dark Mode Styles */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

/* Navbar dark mode */
.dark-mode .navbar {
    background-color: #2d2d2d !important;
    border-bottom: 1px solid #404040;
}

.dark-mode .navbar-brand,
.dark-mode .navbar-nav .nav-link {
    color: #e0e0e0 !important;
}

.dark-mode .navbar-nav .nav-link:hover,
.dark-mode .navbar-nav .nav-link:focus {
    color: #ffffff !important;
}

/* Cards dark mode */
.dark-mode .card {
    background-color: #2d2d2d;
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.dark-mode .card-header {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.dark-mode .card-body {
    color: #ffffff;
}

/* Forms dark mode */
.dark-mode .form-control,
.dark-mode .form-select {
    background-color: #404040;
    border-color: #555555;
    color: #e0e0e0;
}

.dark-mode .form-control:focus,
.dark-mode .form-select:focus {
    background-color: #4a4a4a;
    border-color: #6c757d;
    box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25);
    color: #ffffff;
}

.dark-mode .form-control::placeholder {
    color: #adb5bd;
}

.dark-mode .form-floating > label {
    color: #adb5bd;
}

.dark-mode .form-check-input {
    background-color: #404040;
    border-color: #555555;
}

.dark-mode .form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Buttons dark mode */
.dark-mode .btn-outline-primary {
    color: #6ea8fe;
    border-color: #6ea8fe;
}

.dark-mode .btn-outline-primary:hover {
    background-color: #6ea8fe;
    border-color: #6ea8fe;
    color: #000;
}

.dark-mode .btn-outline-danger {
    color: #ea868f;
    border-color: #ea868f;
}

.dark-mode .btn-outline-danger:hover {
    background-color: #ea868f;
    border-color: #ea868f;
    color: #000;
}

/* Alerts dark mode */
.dark-mode .alert-danger {
    background-color: #2c0b0e;
    border-color: #842029;
    color: #ea868f;
}

.dark-mode .alert-success {
    background-color: #0a2e0a;
    border-color: #0f5132;
    color: #75b798;
}

.dark-mode .alert-info {
    background-color: #055160;
    border-color: #087990;
    color: #6edff6;
}

/* Tables dark mode */
.dark-mode .table {
    --bs-table-bg: transparent;
    --bs-table-accent-bg: rgba(255, 255, 255, 0.05);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.05);
    --bs-table-active-bg: rgba(255, 255, 255, 0.1);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.075);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .table > :not(caption) > * > * {
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .table-light {
    --bs-table-bg: rgba(255, 255, 255, 0.1);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .table-light > th,
body.dark-mode .table-light > td {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Table rows styling for light and dark modes */
.table tbody tr {
    background-color: #ffffff !important;
    color: #212529 !important;
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: #e9ecef !important;
    color: #212529 !important;
}

/* Dark mode table rows */
.dark-mode .table tbody tr {
    background-color: #2d2d2d !important;
    color: #ffffff !important;
}

.dark-mode .table tbody tr:hover {
    background-color: #4a5568 !important;
    color: #ffffff !important;
}

/* Override Bootstrap's striped table behavior for consistent row colors */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: #ffffff !important;
    color: #212529 !important;
}

.table-striped tbody tr:nth-of-type(even) {
    background-color: #ffffff !important;
    color: #212529 !important;
}

.dark-mode .table-striped tbody tr:nth-of-type(odd) {
    background-color: #202020 !important;
    color: #ffffff !important;
}

.dark-mode .table-striped tbody tr:nth-of-type(even) {
    background-color: #202020 !important;
    color: #ffffff !important;
}

/* Ensure table cells and links have proper colors */
.table tbody tr td {
    color: inherit !important;
}

.dark-mode .table tbody tr td {
    color: #ffffff !important;
}

/* Style links within table rows */
.table tbody tr td a {
    color: #0d6efd !important;
}

.dark-mode .table tbody tr td a {
    color: #6ea8fe !important;
}

.dark-mode .table tbody tr td a:hover {
    color: #9ec5fe !important;
}


.table thead th {
    background-color: #f8f9fa !important;
    border-bottom: 2px solid #dee2e6;
    color: #000000 !important;
}

.dark-mode .table thead th {
    background-color: #374151 !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
}

/* Style small/muted text in table cells */
.table tbody tr td small {
    color: inherit !important;
}

.dark-mode .table tbody tr td small {
    color: #ffffff !important;
}

.dark-mode .table tbody tr td .text-muted {
    color: #ffffff !important;
}

/* Ensure badges have proper styling in dark mode */
.dark-mode .badge {
    color: #ffffff !important;
}

/* Page header text styling */
.dark-mode .text-muted {
    color: #e0e0e0 !important;
}

.dark-mode p.text-muted {
    color: #e0e0e0 !important;
}

/* Theme toggle button */
#theme-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.15s ease-in-out;
}

#theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dark-mode #theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Chart containers dark mode */
.dark-mode .chart-container {
    background-color: #2d2d2d;
    border-color: #404040;
}

/* Smooth transitions for theme switching */
body,
.navbar,
.card,
.form-control,
.form-select,
.btn,
.alert,
.table {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Bootstrap 5 utility classes for better layout */
.d-inline-block {
    display: inline-block !important;
}

/* Update existing styles to use Bootstrap utilities */
.question-box {
    margin: 0 auto 1rem auto;
    padding: 1rem;
    text-align: left;
    width: 60%;
    border: 2px solid #dc3545;
    border-radius: 0.375rem;
}

/* Custom styling for the response form */
.question-card .card {
    transition: all 0.3s ease;
    border-radius: 12px;
}

.question-card .card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.question-card .form-label {
    font-weight: 600;
    margin-bottom: 1rem;
}

.form-control-lg, .form-select-lg {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control-lg:focus, .form-select-lg:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-check-custom {
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.form-check-custom:hover {
    background-color: #f8f9fa;
    border-color: #0d6efd;
}

.form-check-custom .form-check-input:checked ~ .form-check-label {
    color: #0d6efd;
    font-weight: 500;
}

.form-check-custom .form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-check-label {
    cursor: pointer;
    width: 100%;
    margin-left: 0.5rem;
}

.btn-submit-response {
    border-radius: 8px;
    font-weight: 600;
    padding: 12px 24px;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
    transition: all 0.3s ease;
}

.btn-submit-response:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
}

/* Dark mode support for response form */
.dark-mode .question-card .card {
    background-color: #2d3748;
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .question-card .card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dark-mode .form-check-custom {
    background-color: #374151;
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.dark-mode .form-check-custom:hover {
    background-color: #4a5568;
    border-color: #6ea8fe;
}

.dark-mode .form-control-lg,
.dark-mode .form-select-lg {
    background-color: #374151;
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.dark-mode .form-control-lg:focus,
.dark-mode .form-select-lg:focus {
    background-color: #4a5568;
    border-color: #6ea8fe;
    color: #ffffff;
}

/* Force form labels to align left */
.form-label {
    text-align: left !important;
    display: block;
    width: 100%;
}

.text-start {
    text-align: left !important;
}

/* Ensure form labels in cards are left-aligned */
.card .form-label,
.card-body .form-label {
    text-align: left !important;
}

/* Dark mode form labels */
.dark-mode .form-label {
    text-align: left !important;
    color: #e0e0e0;
}

/* Responsive adjustments for response form */
@media (max-width: 768px) {
    .respond-container {
        max-width: 95% !important;
        padding: 0 10px;
    }
    
    .respond-card-body {
        padding: 1.5rem !important;
    }
    
    .form-check-custom {
        padding: 0.75rem;
    }
}