﻿/* ================================================
   GLOBAL STYLES – EA 2026 modern layout
================================================ */

body {
	margin: 0;
	padding: 0;
	font-family: "DM Sans",Arial, sans-serif;
	background: #ffffff;
	color: #333;
}

h1, h2, h3, h4, h5, h6 {
	font-family: "Pathway Extreme", sans-serif;
}

img {
	vertical-align: middle;
}

a {
	color: #165881;
	text-decoration: none;
}

	a:hover {
		text-decoration: underline;
	}


/* ================================================
   HEADER WITH WAVE BACKGROUND
================================================ */

.site-header {
	background-image: url("ea_header.svg");
	background-repeat: no-repeat;
	background-size: 100% auto;
	background-position: center top;
	min-width: 1200px;
	max-width: 1200px;
	margin: 0 auto;
	height: 280px; /*343*/
	position: relative;
}


/* Sisältö max 1000px */
.header-inner {
	max-width: 1000px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	height: 100%;
}

/* Vasen ylänurkka */
.header-left {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.back-link {
	position: absolute;
	top: 20px; /* säädä */
	left: 4%; /* sama kuin logolla */
	color: #cde1f0;
	font-size: 14px;
	text-decoration: none;
}


	.back-link:hover {
		text-decoration: underline;
	}

/* Logo */

.header-logo {
	position: absolute;
	top: 25%;
	left: 7%;
	width: 22%;
	user-select: none; /* ← estää tekstin valinnan */
	-webkit-user-select: none;
	-ms-user-select: none;
}



/* Oikea puoli */
.header-right {
	text-align: right;
	margin-top: 40px; /* siirtää otsikkoa alemmas, kuten mallissa */
	user-select: none; /* ← estää tekstin valinnan */
	-webkit-user-select: none;
	-ms-user-select: none;
}

	.header-right h1 {
		margin: 0;
		font-size: 32px;
		font-weight: 300;
		color: white;
	}

.subtitle {
	font-size: 18px;
	color: white;
	opacity: 0.9;
	margin-top: 8px;
}


/* ================================================
   MAIN CONTENT LAYOUT (2 columns)
================================================ */

.content {
	max-width: 1000px;
	margin: 0px auto 30px;
	padding: 0 20px;
}

.two-col-wrapper {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	max-width: 1000px;
	margin: 40px auto;
	padding: 0 20px;
}


/* ================================================
   LEFT SIDE (LOGIN AREA)
================================================ */

.login-box {
	background: white;
	padding: 25px;
	border-radius: 8px;
	box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.login-btn {
	background: #165881;
	color: white;
	padding: 10px 24px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
}

	.login-btn:hover {
		background: #0f3754;
	}

.contact-info {
	margin-top: 20px;
	font-size: 14px;
}


/* ================================================
   USER MENU (RIGHT SIDE)
================================================ */

.wf-user-info {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 20px;
	margin-bottom: 20px;
}

.wf-username {
	font-size: 15px;
}

	.wf-username span {
		font-weight: bold;
	}


/* ================================================
   DROPDOWN MENU (paamenu)
================================================ */

.paamenu {
	list-style: none;
	padding: 0;
	margin: 0;
	position: relative;
}

	.paamenu,
	.paamenu ul,
	.paamenu li,
	.paamenu ul li {
		list-style: none;
		margin: 0;
		padding: 0;
	}

		.paamenu li:empty {
			height: 0;
			padding: 0;
			margin: 0;
			overflow: hidden;
		}


	.paamenu > li {
		cursor: pointer;
		padding: 5px 10px;
		font-size: 20px;
		color: #165881;
	}

		.paamenu > li > ul {
			display: none;
			position: absolute;
			right: 0;
			top: 28px;
			background: white;
			border-radius: 6px;
			box-shadow: 0 3px 10px rgba(0,0,0,0.15);
			padding: 8px 0;
			min-width: 180px;
			z-index: 999;
		}

		.paamenu > li:hover > ul {
			display: block;
		}

		.paamenu > li > ul > li {
			padding: 10px 20px;
			white-space: nowrap;
		}

			.paamenu > li > ul > li:hover {
				background: #f0f7fb;
			}


/* ================================================
   FOOTER AALLOLLA + OIKEAT TEKSTIEN SIJOITTELUT
================================================ */
/* Footer-tausta */
.site-footer {
	background: white;
	padding: 0;
}

/* Sininen keskitetty laatikko, max 1200px */
.footer-bar {
	width: 100%;
	max-width: 1200px;
	height: 80px; /* säädä */
	background: #1E5C81;
	margin: 0 auto; /* keskitys */
}

/* Alaosan tekstit valkoisella taustalla */
.footer-inner {
	max-width: 1000px;
	margin: 0 auto;
	padding: 20px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 14px;
	color: #777;
}

	.footer-inner a {
		color: #777;
		text-decoration: none;
	}

		.footer-inner a:hover {
			text-decoration: underline;
		}


/* ================================================
   RESPONSIVE (MOBILE)
================================================ */

@media (max-width: 850px) {
	.content {
		grid-template-columns: 1fr;
	}

	.header-inner {
		flex-direction: column;
		text-align: center;
	}

	.wf-user-info {
		flex-direction: column;
		align-items: flex-end;
	}
}


/* ================================================
   WEBFORMS CONTROLS
================================================ */

input[type="text"],
input[type="password"],
textarea {
	border: 1px solid #cecece;
	background: white;
	width: 100%;
	box-sizing: border-box;
	padding: 4px;
	font-size: 14px;
}

	input:focus, textarea:focus, select:focus {
		box-shadow: 0 0 5px #165881;
		border-color: #165881;
	}

select {
	border: 1px solid #cecece;
	background-color: white;
	padding: 4px;
	font-size: 14px;
	appearance: none;
	background-image: url(dropkuva.gif);
	background-repeat: no-repeat;
	background-position: right 10px center;
}


/* ================================================
   GRIDVIEW + TABLES
================================================ */

table {
	border-collapse: collapse;
}

th {
	text-align: left;
}

#ctl00_ContentPlaceHolder1_gridviewHakemukset,
#ctl00_ContentPlaceHolder1_gridviewApurahat {
	margin-top: 10px;
}

	#ctl00_ContentPlaceHolder1_gridviewHakemukset > tbody > tr:first-child,
	#ctl00_ContentPlaceHolder1_gridviewApurahat > tbody > tr:first-child {
		background: transparent;
		border-bottom: 1px solid #cecece;
		font-size: 16px;
	}


/* ================================================
   POPUP WINDOWS
================================================ */

.datalink_popup_overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.8);
	z-index: 1002;
}

.datalink_popup_content {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: white;
	border: 16px solid #1E5C81;
	padding:30px;
	width: 700px;
	height: 500px;
	z-index: 1003;
	overflow: auto;
}



/* ============================================
   LOGIN – Modern EA 2026 style
============================================ */

/* Poista ASP.NET Login -kontrollin ulkokehys + taustaväri */
.ea-login {
	background: none !important;
	border: none !important;
	border-collapse: separate !important;
}

	/* Ulkokehyksen padding + border + tausta */
	.ea-login > tbody > tr > td {
		padding: 40px !important;
		background: #ffffff !important;
		border: 1px solid #dfe5ea !important;
		border-radius: 12px !important;
	}

	/* Login-otsikko */
	.ea-login td[style*="background-color:#5D7B9D"] {
		background: none !important;
		color: #165881 !important;
		font-size: 26px !important;
		font-weight: 600 !important;
		padding-bottom: 25px !important;
		text-align: center !important;
	}

	/* Pakota label + input rivit blokiksi (ei taulukon 2-sarakelayoutia) */
	.ea-login > tbody > tr > td > table tr {
		display: block;
		margin-bottom: 16px;
	}

		.ea-login > tbody > tr > td > table tr td {
			display: block;
			width: 100%;
			text-align: left !important;
		}

	/* Labelien moderni tyyli */
	.ea-login label {
		display: block !important;
		width: 100% !important;
		margin-top: 0px !important; /* väli edellisen elementin jälkeen */
		margin-bottom: 6px !important; /* väli label → input */
		font-size: 16px !important;
		font-weight: 500 !important;
		color: #165881 !important;
	}

	.ea-login span[id*="Required"] {
		visibility: hidden !important;
		height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		display: inline-block !important;
	}

	/* Ensimmäinen label ei tarvitse niin paljon ylätilaa */
	.ea-login label:first-of-type {
		margin-top: 10px !important;
	}

	/* Tekstikentät */
	.ea-login input[type="text"],
	.ea-login input[type="password"] {
		width: 100% !important;
		padding: 12px 14px !important;
		margin-bottom: 0px !important;
		border: 1px solid #c4cbd2 !important;
		border-radius: 6px !important;
		background: #f8f9fa !important;
		font-size: 15px !important;
		box-sizing: border-box !important;
	}

	/* Login-nappi */
	.ea-login input[type="submit"] {
		width: 100% !important;
		padding: 14px !important;
		margin-top: 5px !important;
		background: #165881 !important;
		color: white !important;
		border: none !important;
		border-radius: 6px !important;
		font-size: 17px !important;
		font-weight: 600 !important;
		cursor: pointer !important;
	}

		.ea-login input[type="submit"]:hover {
			background: #0f3f61 !important;
		}

	/* Linkit */
	.ea-login a {
		display: block !important;
		margin-top: 10px !important;
		color: #165881 !important;
		font-size: 14px !important;
	}

		.ea-login a:hover {
			text-decoration: underline !important;
		}

	/* ASP.NET default "align=right" pois käytöstä */
	.ea-login td[align="right"] {
		text-align: left !important;
	}

	/* Virheilmoitus ("Login failed") */
	.ea-login span[id*="FailureText"],
	.ea-login td span[style*="color:Red"] {
		display: block !important;
		margin: 10px 0 15px 0 !important;
		text-align: center !important;
		font-size: 15px !important;
		font-weight: 600 !important;
		color: #c0392b !important;
	}
