/* Default theme (Classic Blue) */
:root {
  --navbar-bg: #0d6efd;
  --navbar-text: #ffffff;
  --body-bg: #f8f9fa;
  --body-text: #212529;
  --footer-bg: #0d6efd;
  --footer-text: #ffffff;

  --btn-bg: #0d6efd;
  --btn-text: #ffffff;
  --btn-hover-bg: #0b5ed7;
  --btn-hover-text: #ffffff;
}

/* Emerald Green Theme */
body.theme-green {
  --navbar-bg: #198754;
  --navbar-text: #ffffff;
  --body-bg: #fdfdfd;
  --body-text: #212529;
  --footer-bg: #146c43;
  --footer-text: #ffffff;

  --btn-bg: #198754;
  --btn-text: #ffffff;
  --btn-hover-bg: #146c43;
  --btn-hover-text: #ffffff;
}

/* Sunset Orange Theme */
body.theme-orange {
  --navbar-bg: #fd7e14;
  --navbar-text: #ffffff;
  --body-bg: #fff7f0;
  --body-text: #212529;
  --footer-bg: #cc5500;
  --footer-text: #ffffff;

  --btn-bg: #fd7e14;
  --btn-text: #ffffff;
  --btn-hover-bg: #cc5500;
  --btn-hover-text: #ffffff;
}

/* Royal Purple Theme */
body.theme-purple {
  --navbar-bg: #6f42c1;
  --navbar-text: #ffffff;
  --body-bg: #f8f6fc;
  --body-text: #212529;
  --footer-bg: #4b2c82;
  --footer-text: #ffffff;

  --btn-bg: #4b2c82;
  --btn-text: #ffffff;
  --btn-hover-bg: #6f42c1;
  --btn-hover-text: #ffffff;
}

/* Dark Mode Theme */
body.theme-dark {
  --navbar-bg: #212529;
  --navbar-text: #f8f9fa;
  --body-bg: #121212;
  --body-text: #e9ecef;
  --footer-bg: #000000;
  --footer-text: #adb5bd;

  --btn-bg: #343a40;
  --btn-text: #f8f9fa;
  --btn-hover-bg: #495057;
  --btn-hover-text: #ffffff;
}

body{
	background-color: var(--body-bg);
	position: relative;
}

.rspl-emblem{
	filter: drop-shadow(1px 1px 1px var(--navbar-text));
}

.navbar,
footer {
  background-color: var(--navbar-bg) !important;
}

.navbar .nav-link,
.navbar .navbar-brand,
.navbar label,
footer {
  color: var(--navbar-text) !important;
}

.container.mainbody {
    box-shadow: 0px 0px 10px 1000px var(--body-text);
    box-sizing: border-box;
	  max-width: none;
    min-height: calc(100vh - 140px);
}

.container.footerbody{
  padding: 0px;
}

.forobj_img, img, input, textarea, canvas, table{
	max-width: 100%;
}

.form-select option {
  white-space: normal !important;
}

/*----------------------button sections start---------------------------*/
.subheader, .mainbody, .footerbody {
  position: relative; /* important for absolute positioning inside */
}

.sticky{
  position: fixed;
  width: 1020px;
  background-color: var(--btn-hover-bg);
  border-top: solid 1px var(--body-bg);
  z-index: 10;
}

.print_pdf_button {
  display: flex;
  flex-direction: row;
  gap: 10px;
  white-space: nowrap;
}

.btn{
  background-color: var(--btn-bg) !important;
  color: var(--btn-text) !important;
}
.btn:hover{
  background-color: var(--body-text) !important;
  color: var(--btn-text) !important;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);  
}

/* ----------------- question selection css start*/
.actions {
	display: flex;
	justify-content: center;
	gap: 15px;
	margin-top: 20px;
}

.actions button {
	padding: 12px 25px;
	border: none;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
}

#submitBtn {
	background-color: #3498db;
	color: white;
}

/* #submitBtn:hover {
	background-color: #2980b9;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
} */

#selectAllBtn {
	background-color: #2ecc71;
	color: white;
}

/* #selectAllBtn:hover {
	background-color: #27ae60;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3);
} */

#clearAllBtn {
	background-color: #e74c3c;
	color: white;
}

/* #clearAllBtn:hover {
	background-color: #c0392b;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
} */

.modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 1000;
	justify-content: center;
	align-items: center;
}

.modal-content {
	background-color: white;
	border-radius: 10px;
	width: 90%;
	max-width: 700px;
	max-height: 80vh;
	overflow-y: auto;
	padding: 30px;
	position: relative;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 15px;
	border-bottom: 1px solid #eee;
}

.modal-title {
	font-size: 24px;
	color: #2c3e50;
	font-weight: 600;
}

.close-modal {
	background: none;
	border: none;
	font-size: 28px;
	color: #7f8c8d;
	cursor: pointer;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	justify-content: center;
	align-items: center;
}

.close-modal:hover {
	color: #e74c3c;
}

.selected-questions-list {
	list-style-type: none;
}

.selected-question-item {
	padding: 15px;
	background-color: #f8f9fa;
	border-radius: 6px;
	margin-bottom: 10px;
	border-left: 4px solid #3498db;
}

/* ADD THESE STYLES FOR BETTER MODAL DISPLAY */
.selected-questions-container {
    max-height: 60vh;
    overflow-y: auto;
}

.selected-question-item {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f9f9f9;
}

.selected-question-item h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
}

.question-content {
    margin-top: 10px;
}

.modal-content {
    width: 90%;
    max-width: 800px;
}
/* ----------------- question selection css end*/

/*----------------------button sections end---------------------------*/
@media (min-width: 576px) {
    .container, .container-sm {
        max-width: 100% !important;
        margin-left: 0px !important;
    }
}

[data-question]{
  display: flex !important;
  align-items: flex-start;
}
[data-question] > div:first-child{
  margin-top: 12px;
  border-bottom: none !important;
}

.iframe-container{
  margin: 0px;
  flex: 1;
  margin-left: 10px;
  margin-bottom: -10px;
  overflow-wrap: break-word;
}
[data-question].d-none{
  display: none !important;
}

@media (min-width: 992px) {
	.navbar .form-select {
		width: 100px !important;
	}
	body{
		margin: 0 auto;
		width: 1020px;
	}
}

#preview_loading{
  width: 210mm;
  height: auto;
  margin: 0 auto;
}

/*-------------for print start---------------------------*/
@media print {
    @page {
      size: A4;
      margin: 10mm;
    }
    body{
      background: white;
      position: relative;
      width: 210mm;
      height: 297mm;
    }

    .print_pdf, nav, footer, h2, .question-checkbox, .row.sticky, .no_print_element{
      display: none !important;
    }
    iframe{
      border: none !important;
      box-shadow: none !important;
      width: 100% !important;
      height: auto;
    }
    .container.mainbody{
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        box-shadow: 0px 0px 0px 0px var(--body-text) !important;
        box-sizing: border-box;
        max-width: none;
        overflow: none !important;
    }
    .container, li {
      page-break-inside: avoid;
    }
    img, table {
      max-width: 100%;
      height: auto;
    }
}
/*-------------for print end---------------------------*/

/*------------------content styles start--------------------*/
ul li{
  list-style: none;
}
.rubric_head{
    font-size: 1rem;
    line-height: 1.5rem;
    margin-left: 30px;
    margin-bottom: 0;
    margin-top: 1rem;
}
/*-------------------------*/
.question-checkbox{
  border: solid 2px var(--btn-bg);
  width: 25px;
  height: 25px;
  cursor: pointer;
  padding-top: 10px;
}

/*-------------------loader while pdf generation start------------------*/
#pdfLoaderOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    font-family: sans-serif;
    font-size: 18px;
    color: #333;
}
.spinner {
    border: 4px solid #ddd;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/*-------------------loader while pdf generation end------------------*/