/* ============================================================
   Common modal styling for the whole application.
   Uses only the classes that already exist in the app, so no markup
   changes are needed. Covers:
     - Bootstrap modals            (.modal, .modal-content, .modal-title ...)
     - Instruction modal           (.instruction-modal, ...)
     - SweetAlert2 dialogs         (.swal2-modal, .swal2-title, ...)
     - Colorbox instruction dialog (#colorbox, #cboxContent, #cNext)
   Loaded after app-font.css so it applies on every screen.
   ============================================================ */

/* ---------- Bootstrap modals ---------- */
.modal .modal-content{
	border: 0;
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
	overflow: hidden;
}
.modal .modal-header{
	padding: 20px 24px;
	border-bottom: 1px solid #ececec;
	text-align: center;
}
.modal .modal-title{
	font-size: 22px;
	font-weight: 700;
	line-height: 1.35;
	color: #161616;
	text-align: center;
}
.modal .modal-body{
	padding: 22px 24px;
	font-size: 16px;
	line-height: 1.7;
	color: #333;
	text-align: center;
}
.modal .modal-footer{
	padding: 16px 24px;
	border-top: 1px solid #ececec;
	background: #fafbfc;
	/* Everything inside the modal is centred, including the buttons. */
	text-align: center;
}
.modal .modal-footer .btn{
	min-width: 120px;
	padding: 10px 22px;
	border-radius: 9px;
	font-weight: 600;
	font-size: 15px;
}
.modal .close{
	opacity: 0.55;
	font-size: 26px;
	line-height: 1;
	text-shadow: none;
}
.modal .close:hover,
.modal .close:focus{
	opacity: 0.9;
}

/* ---------- Instruction modal (mySchedule) ---------- */
/* Higher specificity than mySchedule.css so these win without !important. */
.instruction-modal-overlay{
	padding: 24px;
	background: rgba(0, 0, 0, 0.55);
}
.instruction-modal-overlay .instruction-modal{
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 720px;
	max-height: 88vh;
	border-radius: 16px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
	overflow: hidden;
}
.instruction-modal-overlay .instruction-modal-header{
	padding: 22px 28px 16px;
	border-bottom: 1px solid #ececec;
	text-align: center;
}
.instruction-modal-overlay .instruction-modal-title{
	margin: 0;
	font-size: 27px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.2px;
	color: #141414;
	text-align: center;
}
.instruction-modal-overlay .instruction-modal-body{
	flex: 1 1 auto;
	padding: 22px 28px 8px;
	overflow-y: auto;
	font-size: 16px;
	line-height: 1.7;
	color: #333;
	/* Everything inside the modal is centred. */
	text-align: center;
}
.instruction-modal-overlay .instruction-modal-body p{
	margin-bottom: 14px;
}
.instruction-modal-overlay .instruction-list{
	margin: 0;
	/* list-style inside keeps the bullets aligned with the centred text */
	list-style-position: inside;
	padding-left: 0;
}
.instruction-modal-overlay .instruction-list li{
	margin-bottom: 12px;
	line-height: 1.7;
}
.instruction-modal-overlay .instruction-modal-footer{
	padding: 16px 28px;
	border-top: 1px solid #ececec;
	background: #fafbfc;
	/* Centre the button too. */
	text-align: center;
}
.instruction-modal-overlay .instruction-modal-footer .btn{
	min-width: 140px;
	padding: 11px 26px;
	border-radius: 10px;
	font-size: 16px;
	font-weight: 600;
}

/* ---------- SweetAlert2 dialogs ---------- */
/* Centre all the dialog content and the buttons. */
.swal2-container .swal2-modal,
.swal2-container .swal2-modal .swal2-buttonswrapper{
	text-align: center;
}
.swal2-container .swal2-modal .swal2-title{
	font-size: 24px !important;
	font-weight: 700;
	line-height: 1.3;
	color: #161616;
}
.swal2-container .swal2-modal .swal2-content{
	font-size: 16px;
	line-height: 1.65;
	color: #333;
}
.swal2-container .swal2-modal .swal2-styled{
	border-radius: 9px;
	padding: 11px 26px;
	font-weight: 600;
}

/* ---------- Colorbox instruction dialog ---------- */
#colorbox #cboxContent{
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}
#colorbox #cboxLoadedContent{
	padding: 24px 26px;
}
#colorbox #cboxClose{
	top: 12px;
	right: 12px;
}
#colorbox .instruction-action #cNext{
	border-radius: 10px;
	padding: 11px 40px;
	font-weight: 600;
}

/* ---------- Layering ----------
   Every dialog must sit above the fixed header (9995), footer (10000) and
   the floating "Show Instruction" button (10100) so none of the blue
   chrome shows over/around the modal. */
.instruction-modal-overlay{
	z-index: 10200 !important;
}
.swal2-container{
	z-index: 10200 !important;
}
/* Bootstrap dialogs (e.g. the logout survey, #serveyModal). Without this the
   fixed header/footer paint on top of the dialog. */
.modal{
	z-index: 10200 !important;
}
.modal-backdrop{
	z-index: 10190 !important;
}
#colorbox,
#cboxOverlay,
#cboxWrapper{
	z-index: 10200 !important;
}
