/* ---------------------------------------------------
    CHOSEN – Estä alasvetovalikon leikkautuminen modalin sisällä
----------------------------------------------------- */

/* Modalin sisältö sallii chosen-dropin ylittää reunat */
.modal-dialog,
.modal-content,
.modal-body { overflow: visible !important; }

/* Scrollin täytyy silti toimia modalissa — vain body saa scrollata */
.modal { overflow-y: auto !important; }

/* Chosen-drop riittävän korkealle z-indeksiin näkyäkseen modaalin yli */
.chosen-container .chosen-drop {
    z-index: 9999 !important;
    position: absolute !important;
}

/* ---------------------------------------------------
    SELECT2 – dropdown-rivien rivivälistys
----------------------------------------------------- */

/* Riittävästi tilaa kaksirivistä templateResult-korttia varten */
.select2-results__option { padding: 6px 10px !important; }

/* ---------------------------------------------------
    SITE FOOTER
----------------------------------------------------- */
#site-footer {
	background-color: #f1f3f5;
	color: #495057;
	border-top: 1px solid #dee2e6;
	margin-top: 3rem;
}

html {
    background: #f1f3f5;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 0.9rem;
    background: #fafafa;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Taulukkodata: hieman pienempi ja tiiviimpi */
.table {
    font-size: 0.875rem;
}

/*
p {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1em;
    font-weight: 300;
    line-height: 1.7em;
    color: #999;
}
*/

a,
a:hover,
a:focus {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s;
}

.line {
    width: 100%;
    height: 1px;
    border-bottom: 1px dashed #ddd;
    margin: 10px 0;
}

/* ---------------------------------------------------
    NAVBAR
----------------------------------------------------- */

/* Navbar-taustaväri — tummempi kuin brändiväri paremman kontrastin vuoksi */
.navbar {
    background-color: #0076A5 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Nav-linkkien koko ja paino */
.navbar-nav .nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding-left: 0.9rem !important;
    padding-right: 0.9rem !important;
}

/* Pieni väli nuolen eteen dropdown-valikoissa */
.navbar .dropdown-toggle::after {
    margin-left: 0.35em;
    vertical-align: 0.15em;
}

/* Hover-efekti */
.navbar-nav .nav-link:hover {
    color: #fff !important;
    opacity: 0.85;
}

/* Aktiivinen valikkoitem */
@media (min-width: 992px) {
    .navbar-nav .nav-link.active {
        border-bottom: 2px solid rgba(255,255,255,0.85);
    }
}

/* Navbar brand-teksti */
.navbar-brand {
    font-size: 1rem;
    font-weight: 600;
}

/* ---------------------------------------------------
    LAYOUT
----------------------------------------------------- */

.wrapper {
    width: 100%;
}

#content {
    width: 100%;
    padding: 20px;
    min-height: 60vh;
}

.search-form {
	padding-top:0px;
	padding-left:5%;
	padding-right:20%;
}

.asset-form {
	padding-top:28px;
	padding-left:5%;
	padding-right:10%;
	padding-top:0px;
}

.card-hover {
	transition: transform 0.15s, box-shadow 0.15s;
}
.card-hover:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(0,0,0,0.12) !important;
}

.block {
	margin-bottom:30px;
	padding:30px;
	border:1px solid #eee;
	background-color: #fefefe;
}

.hidden {
	display: none;
}

.res-col {
	border-right: 1px solid #ccc;	
}	

.res-line {
	margin-top: 20px;
	margin-bottom: 20px;
	border-bottom: 1px solid #ccc;	
}	

td.isb-data, div.isb-data {
	font-size: 1rem;
	font-weight: 600;
	padding-top:0.75em;
	line-height: 1.2;
	color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 3px;
	overflow-wrap: break-word;
	white-space: pre-line;
}

.isb-location {
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 3px;
	overflow-wrap: break-word;
	white-space: pre-line;
}


.map-card {
	max-width:400px;
	min-width:400px;
	margin-bottom:1px;
	border-left: 8px solid #009AC8;
	overflow-x:hidden;
}

#result-map-wrapper{
	position:absolute;	
	max-height:500px;
	overflow-x:hidden;
}

#result-map-items{
	padding-top:2px;
	padding-left:20px;
	overflow-x:hidden;
	overflow-y:auto;
}

@media (min-width: 1024px) {
	.map-wrapper {
		border-left:1px solid #eee;
	}
	
}

@media (max-width: 1024px) {
	.search-form {
		padding-right:5%;	
	}
	.asset-form {
		padding-right:5%;	
	}	
}	

.edit-cell {
	font-size:12px;
	color: #000;
	max-width: 10px;
	padding-right:3px !important;
	padding-left:3px !important;
	background-color:#fff;
}

.btn-edit>i {
	color: #aaa !important;
}

.btn-edit:hover>i {
	color: #000 !important;
}

.btn-delete>i {
	color: #bbb !important;
}

.btn-delete:hover>i {
	color: #F00 !important;
}

@media (min-width: 1024px) {
	.navbar-nav>li.active {
		border-bottom:2px solid #fff;
	} 
}

.talousarvio-tili {
	padding-left:50px!important;		
	white-space: nowrap;
	/* font-size:90% */
}

.talousarvio-jaama {
	padding-left:16px!important;	
	white-space: nowrap;
	/* font-size:90% */
}

.talousarvio-luku {
	display: block;
	width: 100%;
	height: calc(1.5em + 1.5rem + 0px);
	padding: 0.75rem 1.5rem;
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.5;
	color: #55595c;
	background-color: #f7f7f9;
	background-clip: padding-box;
	border: 0px solid #ced4da;
	border-radius: 0;	
	color: #55595c;
	background-color: #f7f7f9;
	border-color: #5a5a5a;
	outline: 0;
	-webkit-box-shadow: 0 0 0 0.1rem rgba(26,26,26,0.15);
	box-shadow: 0 0 0 1px rgba(26,26,26,0.15);
	line-height: 0.8;
	height: 30px;
	padding: 10px 20px 10px 20px;
	margin-top:-5px;
}

.talousarvio-sum-luku {
	display: block;
	width: 100%;
	height: calc(1.5em + 1.5rem + 0px);
	padding: 0.75rem 1.5rem;
	font-size: 0.875rem;
	line-height: 1.5;
	border: 0px solid #ced4da;
	border-radius: 0;	
	color: #55595c;
	outline: 0;
	line-height: 0.8;
	height: 30px;
	padding: 10px 20px 10px 20px;
	margin-top:-5px;
}

.talousarvio-luku-readonly {
	display: block;
	width: 100%;
	height: calc(1.5em + 1.5rem + 0px);
	padding: 0.75rem 1.5rem;
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.5;
	border-radius: 0;	
	color: #55595c;
	outline: 0;
	line-height: 0.8;
	height: 30px;
	padding: 10px 20px 10px 20px;
	margin-top:-5px;
}

.btn-space {
	margin-left:0.5em!important;
}

.btn-drowdown {
  padding-top:0px;	
  padding-bottom:0px;
  background-color: transparent;
}

.btn-drowdown:hover {
  background-color: transparent;
}

.info {
	font-size:96%;
	color: #606060;
}

.table-action-button {
	
}

.btn-edit, .btn-kohdista {
	color: #606060 !important;
	text-decoration: underline;
}

.btn-edit::after, .btn-kohdista::after {
  /* content: " \0020\0020"; */
  display: inline-block;
}

.btn-edit:hover, .btn-kohdista:hover {
	color: #000 !important;
	text-decoration: underline;
}

.btn-edit:hover::after, .btn-kohdista:hover::after {
  /* content: " \270e"; */
  text-decoration: none;
  display: inline-block;
}

.select-sm {
  max-width:20px;	
}

.no-wrap {
	white-space: nowrap!important;
}

table.dataTable tbody > tr.selected, table.dataTable tbody > tr > .selected {
  background-color: #fff!important;
  color: #55595c;
}

.kohdistettu {
}

#vesimaksuennakko-table tbody tr.selected > * {
	background-color: #dbeafe !important;
	color: #1e40af !important;
	box-shadow: none !important;
}

@media print {
  .container, .content {
    width: auto;
  }
}

@media print {
   .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
        float: left;
   }
   .col-md-12 {
        width: 100%;
   }
   .col-md-11 {
        width: 91.66666667%;
   }
   .col-md-10 {
        width: 83.33333333%;
   }
   .col-md-9 {
        width: 75%;
   }
   .col-md-8 {
        width: 66.66666667%;
   }
   .col-md-7 {
        width: 58.33333333%;
   }
   .col-md-6 {
        width: 50%;
   }
   .col-md-5 {
        width: 41.66666667%;
   }
   .col-md-4 {
        width: 33.33333333%;
   }
   .col-md-3 {
        width: 25%;
   }
   .col-md-2 {
        width: 16.66666667%;
   }
   .col-md-1 {
        width: 8.33333333%;
   }
}

@media print {
   .form-control {
		padding-left:0px;
		padding-right: 0px;
		padding-top: 0px;
   }		
}

textarea { height: auto; }

.full > .control-label {
	display:block;
	text-align:left;
	width:100%;
}		

.full > .controls {
	width: 100%;	
}

ol > li > a { 
	text-decoration: underline 1px #aaa;
}

table.table-bordered.dataTable tbody td {
	padding-top:4px !important;
	padding-bottom:4px !important;
}

.filter-title {
	color:#aaa;
	font-size:10px;
	margin-top:-20px;
	margin-left:-20px;
	padding-bottom:10px;
}

.btn-space-right {
	margin-bottom:0.2em;
	margin-right:0.2em;
}	

.breadcrumb-item + .breadcrumb-item::before {
	content: ">";
}

/* Ohje-lamppu (toggle) — pyöreä, ei venymistä mobiilissa */
.help-toggle {
	width: auto !important;
	flex: 0 0 auto;
	line-height: 1;
}
.help-toggle.help-lit {
	color: #fff !important;
	background-color: #0d6efd;
	border-color: #0d6efd;
}
.help-toggle.help-lit:hover {
	background-color: #0b5ed7;
	border-color: #0b5ed7;
}


.close {
  position: absolute;
  right: 15px;
  top: 10px;
}

/* Kaavio — koko määritetään canvas-kontainerissa, ei CSS:ssä */	

textarea {
	min-height: 60px;
	overflow-y: auto;
	word-wrap:break-word
}

/* Taulukko joka muuttuu korttilistaukseksi mobiililla */
@media (max-width: 767px) {
	.dt-mobile-stack .dt-container,
	.dt-mobile-stack .dt-scroll,
	.dt-mobile-stack .dt-scroll-body {
		width: 100% !important;
		overflow-x: hidden !important;
	}
	.dt-mobile-stack table.dataTable {
		width: 100% !important;
	}
	.dt-mobile-stack table.dataTable thead {
		display: none;
	}
	.dt-mobile-stack table.dataTable tbody tr {
		display: block;
		width: 100%;
		border: 1px solid #dee2e6;
		border-radius: 0.375rem;
		margin-bottom: 0.6rem;
		background: #fff;
		box-sizing: border-box;
	}
	.dt-mobile-stack table.dataTable tbody td {
		display: flex;
		justify-content: space-between;
		align-items: baseline;
		gap: 0.5rem;
		padding: 0.4rem 0.75rem;
		border: none !important;
		border-bottom: 1px solid #f3f3f3 !important;
		white-space: normal;
	}
	.dt-mobile-stack table.dataTable tbody td:last-child {
		border-bottom: none !important;
	}
	.dt-mobile-stack table.dataTable tbody td::before {
		content: attr(data-label);
		font-weight: 600;
		color: #6c757d;
		font-size: 0.8rem;
		flex: 0 0 auto;
		min-width: 7rem;
		text-align: right;
	}
	/* Piilota tyhjät solut mobiilissa */
	.dt-mobile-stack table.dataTable tbody td:empty {
		display: none;
	}
	/* Rivit koko kortin leveyteen — toimii kun card-body:llä on p-0 p-md-3 */
	.dt-mobile-stack table.dataTable tbody tr {
		border-radius: 0;
		margin-bottom: 0;
		border-left: none;
		border-right: none;
	}
	.dt-mobile-stack table.dataTable tbody tr:not(:last-child) {
		border-bottom: 1px solid #dee2e6;
	}
	.dt-mobile-stack table.dataTable tbody tr:last-child {
		border-bottom: none;
	}
}

/* ---------------------------------------------------
   DataTables Buttons — poista oletuksen .btn-secondary harmaa tausta
   Buttons lisää napeille oletusluokan .btn-secondary, joka asettaa
   Bootstrapin --bs-btn-bg-muuttujan harmaaksi (#6c757d). Bootstrap outline
   -luokka ei nollaa --bs-btn-bg:tä, joten napista tulisi harmaa tausta +
   outline-värinen teksti. Nollataan muuttuja napin elementillä (specificity
   .dt-buttons .btn-outline-* [0,2,0] voittaa .btn-secondary [0,1,0]) →
   outline-väritys (teksti, reuna, hover) toimii Bootstrap-natiivisti.
----------------------------------------------------- */
.dt-buttons .btn-outline-primary,
.dt-buttons .btn-outline-secondary,
.dt-buttons .btn-outline-success,
.dt-buttons .btn-outline-danger,
.dt-buttons .btn-outline-warning,
.dt-buttons .btn-outline-info {
	--bs-btn-bg: transparent !important;
	box-shadow: none;
}

/* ---------------------------------------------------
   Invoice-card: aktiivinen kenttä korostus
----------------------------------------------------- */
.invoice-card .form-control:focus,
.invoice-card select.form-control:focus {
	border-bottom: 2px solid #0076A5 !important;
	background-color: rgba(0, 118, 165, 0.05) !important;
	box-shadow: none !important;
	outline: none !important;
}

/* ---------------------------------------------------
   Ajankohtaista-korttien teksti (Quill-HTML)
----------------------------------------------------- */
#tapahtumat .card-title,
#tapahtumat .card-text {
	overflow-wrap: break-word;
	word-break: normal;
}
#tapahtumat .card-text p:last-child {
	margin-bottom: 0;
}

/* ---------------------------------------------------
   talousarvio-raportti: siistit lukusolut ilman
   talousarvio-luku-readonly padding-ylikirjoituksia
----------------------------------------------------- */
.talousarvio-luku-readonly {
	display: inline !important;
	width: auto !important;
	height: auto !important;
	padding: 0 !important;
	margin: 0 !important;
}

/* ---------------------------------------------------
   Tulostus: <textarea>-kentät korvataan tavallisella
   block-tekstillä (selain leikkaa textarea-sisällön
   tulostuksessa). syncTextareaPrintClones() luo kloonin
   (.textarea-print) beforeprint-tapahtumassa.
----------------------------------------------------- */
.textarea-print { display: none; }
@media print {
	textarea { display: none !important; }
	.textarea-print {
		display: block;
		width: 100%;
		white-space: pre-wrap;
		overflow-wrap: break-word;
		word-wrap: break-word;
	}
}