@import url('https://fonts.googleapis.com/css2?family=Open+Sans&family=Roboto+Slab:wght@700&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css');

:root {
	/*CHANGE EXISTING*/
    --primary-color: #007864;
    --button-color: #049078;

	/*ADD NEW*/
     --rg-primary-color-1: #007864;
     --rg-primary-color-2: #049078; /* Används endast på knappar med ikon */
     --rg-primary-color-3: #E0EFEC;
 
     --rg-secondary-color-1: #004887;
     --rg-secondary-color-2: #1E6AAC;
     --rg-secondary-color-3: #DDEBF8;
     
     --rg-text-color: #444648;
     --rg-link-color: #004887;
 
     --rg-active-color: #FED1BB;
 
     --rg-background-color: #F5F4F4;
     --rg-decoration-color: #C6007E;

     --rg-white-color: #FFFFFF;
     --rg-black-color: #000000;

	/* REGION GOTLAND RGB COLOR PALETTE FOR SHADING */    
    /* USE EXAMPLE - color: rgba(var(--rg-red-color), .3); */
	 --rg-gray-color: 77, 79, 83;

	 /* REUSE OF SOLEIL COLOR, IF COLOR CHANGES ON GOTLAND.SE, CHANGE THIS */
	 --sol-color-Turkos: #e0efec;

	--logo-img: url("https://gotland.se/images/18.453d27bd18baba433d551d6/1699621830051/rg_logo_vit.svg");
	--header-bg: url("https://gotland.se/images/18.e8fa44c192bd56969c56249/1730796541911/rg_topp_tema1.svg");
	--footer-img: url("https://gotland.se/images/18.e8fa44c192bd56969c56231/1730796467625/rg_fot_2.svg");
	--footer-mobile-img: url("https://gotland.se/images/18.453d27bd18baba433d551d4/1699621787679/rg_fot_768.svg");
	--max-width: 820px;
	--rg-border-radius: 10px;
	
	
	/* SET FOR REM */
	font-size: 16px;
}

* { font-size: .875rem; }

/* HEADINGS */
.PortalLink, .MasterLegend, .StepLegend {
	color: var(--rg-text-color);
	font-family: "Roboto Slab", serif;
	font-weight: 700;
	font-style: normal;
}

h1, .MasterLegend { font-size: 1.625rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
h4, h5, h6 { font-size: 1rem; }


/* TRANSITIONS */
* {
	transition: all .3s;
}

/* BUTTONS */
button {
	min-height: 52px;
	border-radius: 24px;
    color: var(--rg-white-color);
    padding: .5rem 52px .5rem 21px;
    position: relative;
	line-height: 1.4;

}

button::after {
	font-family: "bootstrap-icons";
	content: "\F138";
	align-items: center;
    background-color: var(--rg-primary-color-1);
    border-radius: 50%;
    color: var(--rg-white-color);
    display: flex;
    font-size: 1.25rem;
    height: 40px;
    justify-content: center;
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
}

button.PreviousButton::after {
	content: "\F12F";
}

button#DownloadButton::after {
	content: "\F30A";
}

button:hover {
	background-color: var(--rg-primary-color-1);
}

button:hover::after {
    background-color: var(--rg-primary-color-2);
}

button:hover:enabled {
	opacity: 1;
}

/* BACKGROUND */
body {
	height: 100dvh;
	width: 100dvw;
	font-family: "Open Sans", sans-serif;
	color: var(--rg-text-color);
	background-color: var(--rg-white-color);
	position: relative;
	z-index: -999;
}

.MasterContainerDiv {
	height: auto;
	min-height: 100dvh;
    width: auto;
    max-width: none;
	display: grid;
	grid-template-rows: auto auto 1fr;

    /* display: flex;
    flex-direction: column;
    align-items: center; */
	margin: 0;
	background-color: var(--rg-white-color);
	position: relative;
	z-index: -99;
}

.MasterContainerDiv > * {
	width: 100%;
	max-width: var(--max-width);
	background-color: white;
	padding: 0 1.25rem;
}

/* HEADER */
.MasterLegend {
	position: relative;
	width: 100%;
	max-width: 100dvw;
	margin-bottom: 0;
	padding: .75rem 1.25rem;
	background-color: var(--rg-primary-color-1);
	color: white;
	text-align: right;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: .75rem solid var(--rg-primary-color-2);
}

.MasterLegend::before {
	content: "";
	background-image: var(--logo-img);
	background-size: contain;
	background-repeat: no-repeat;
	background-position: left;
	min-width: 135px;
	min-height: 52px;
	margin-right: 1rem;
}

/* MAIN CONTENT */
.MasterFieldset {
	padding: 1rem;
	margin: 1.5rem 0;
	min-height: auto;
	/* box-shadow: 0 3px 5px 0 rgb(0 0 0 / 15%); */
	justify-self: center;
	display: flex;
	flex-direction: column;
}

.MasterFieldset::after {
	margin-top: 1rem;
	font-style: italic;
	content: "Informationen kommer från verksamhetssystemet EDP Future.";
	display: block;
}

.PortalLinkContainer {
	position: relative;
	background-color: var(--rg-white-color);
    border: 1px solid rgba(var(--rg-gray-color), .3);
    box-shadow: 0 3px 5px 0 #00000026;
    box-sizing: border-box;
    cursor: pointer;
    min-height: 96px;
    padding: .5rem 1rem;
	padding-right: 3rem;
    -webkit-text-decoration: none;
    text-decoration: none;
    width: 100%;
}

.PortalLinkContainer::after {
	font-family: "bootstrap-icons";
	content: "\F138";
	display: flex;
	align-items: center;
    border-radius: 50%;
    color: var(--rg-text-color);
    font-size: 1.25rem;
    height: 40px;
    justify-content: center;
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
}

.PortalLinkContainer:hover {
	background-color: var(--rg-primary-color-3);
}

.PortalLinkContainer .PortalLink {
	position: absolute;
	padding: .5rem 1rem;
	inset: 0;          /* top: 0; right: 0; bottom: 0; left: 0 */
	display: block;    /* so it fills the box */
}

.PortalLinkContainer .PortalLink:hover {
	text-decoration: underline;
}

.PortalLinkContainer .PortalLinkDescription {
	padding-top: 1.5rem;
}

.navigation-bar-icon-container {
	background-color: var(--rg-primary-color-1);
}

/* FOOTER */
.Footer {
	padding: 0;
	max-width: 100dvw;
	font-size: 0px;
	display: flex;
	flex-direction: column;
	background-color: var(--rg-secondary-color-1);
}

/* .Footer::before {
	content: "";
	height: 20dvw;
    background: var(--footer-mobile-img);
    background-repeat: no-repeat;
    background-size: contain;
	background-position: bottom center;
    background-color: var(--rg-ms-background);
} */

.Footer::before {
	content: "";
	aspect-ratio: 16 / 6;
    background: var(--footer-mobile-img);
    background-repeat: no-repeat;
    background-size: cover;
	background-position: bottom center;
    background-color: var(--rg-white-color);
}

.Footer::after {
	display: block;
	width: 100%;
	padding: 3rem 0;
	font-family: "Open Sans", sans-serif;
	text-align: center;
	color: white;
	background-color: var(--rg-secondary-color-1);
	font-size: 0.85rem;
	content: "Vid frågor kontakta kundtjänst\A 0498 - 26 90 00 (Knappval 2)\A\ARegion Gotland";
	white-space: pre-wrap;
}

/* HIDE BUTTONS*/
.LogOutButton,.LogOutButton:link,.LogOutButton:visited{
	display:none;
}

.BackToPortalButton {
	display: none;
}

/* OUTLINE COLOR WHEN FOCUS*/
*:focus {
    outline-offset: 2px;
}

*:focus-visible {
    transition: none;
    outline: 2px solid var(--rg-secondary-color-2);
}

/* SPECIAL FOR ErrorPageGeneralTextLabel */
.ErrorPageGeneralTextLabel::after {
	display: block;
	margin-top: 1.25rem;
	font-weight: 400;
	content: "Detta kan bero på att abonnemanget \A står på en annan person, eller på en organisation. Om även du ska ha tillgång behöver du kontakta kundtjänst på 0498 - 26 90 00 (Knappval 2).";
}

/* SPECIAL FOR SimpleSearch_ContainerDiv */
.SimpleSearch_ContainerDiv {
	height: 100%;
	padding: 30px 45px;
	background-color: var(--sol-color-Turkos);
	border-radius: var(--rg-border-radius);
}

.SimpleSearch_ContainerDiv #SearchTextBox {
	font-family: "Open Sans", sans-serif;
	font-size: 1rem;
	border-radius: var(--rg-border-radius);
    border: 1px solid rgba(var(--rg-gray-color), .3);
    padding: .5rem;
    width: 100%;
    box-sizing: border-box;
    min-height: 48px;
    cursor: pointer;
}

.SimpleSearch_ContainerDiv #SearchTextBox:focus::placeholder, .SimpleSearch_ContainerDiv #SearchTextBox:focus-visible::placeholder {
	opacity: 0;
}

.SimpleSearch_ContainerDiv .SimpleSearch_ErrorLabel {
	font-size: 1rem;
	color: var(--rg-text-color);
}

.SimpleSearch_ContainerDiv .ui-widget-content {
	background: none;
	background-color: var(--rg-background-color);
	transition: none;
}

.SimpleSearch_ContainerDiv ~ ul.ui-menu li.ui-menu-item a {
	color: var(--rg-text-color);
	font-family: "Open Sans", sans-serif;
	font-size: 1rem;
	cursor: pointer;
	transition: none;
}

.SimpleSearch_ContainerDiv .ui-state.focus {
	color: var(--rg-text-color);
	border-color: rgba(var(--rg-gray-color), .3);
	background-color: var(--rg-secondary-color-3);
}

.SimpleSearch_ContainerDiv #SearchResult.SimpleSearch_SearchResult:empty {
    text-align: center;
}

.SimpleSearch_ContainerDiv #SearchResult.SimpleSearch_SearchResult:empty::before {
    content: "";
    display: inline-block;
    width: 40px;
    height: 40px;
    margin-top: .625rem;
    margin-bottom: .625rem;
	border: 4px solid transparent;
    border-top-color: var(--rg-primary-color-2);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.SimpleSearch_ContainerDiv #SearchResult.SimpleSearch_SearchResult {
	margin-left: .25rem;
}

.SimpleSearch_ContainerDiv #SearchResult.SimpleSearch_SearchResult p.simple-search-result {
	margin-bottom: .75rem;
}

.SimpleSearch_ContainerDiv #SearchResult.SimpleSearch_SearchResult .simple-search-container {
	margin-bottom: .75rem;
	padding-left: .75rem;
	border-left: .5rem solid var(--rg-primary-color-2);
}

.SimpleSearch_ContainerDiv #SearchResult.SimpleSearch_SearchResult:focus-visible {
	outline: none;
}

.SimpleSearch_ContainerDiv button:disabled {
	display: none;
}

/* MEDIA QUERIES */
/* MAX */
@media only screen and (max-width: 300px) {
	h1, .MasterLegend { font-size: 1.375rem; }
}

@media only screen and (max-width: 420px) { 
	.MasterLegend {
		flex-direction: column;
		align-items: flex-start;
		text-align: left;
		gap: .75rem;
	}
}

/* MIN */
@media only screen and (min-width: 420px) {
	.MasterLegend::before {
		min-width: 90px;
		min-height: 35px;
	}
} 

@media only screen and (min-width: 460px) {
	.MasterLegend {
		padding: 1.25rem 1.25rem 2rem 1.25rem;
		position: relative;
	}

	.MasterLegend::before {
		min-width: 135px;
		min-height: 52px;
	}

	/* .MasterLegend::after {
		content: "";
		background-image: url(./img/drawing.svg);
		height: 1.25rem;
		width: 100dvw;
		position: absolute;
		bottom: 0;
		right: 0;
		background-repeat: no-repeat;
    	background-size: cover;

	} */
}

@media only screen and (min-width: 620px) {
	h1, .MasterLegend { font-size: 1.625rem; }
}

@media only screen and (min-width: 820px) {
	* { font-size: 1rem; }

	h1, .MasterLegend { font-size: 2.25rem; }
	h2 { font-size: 1.625rem; }
	h3 { font-size: 1.375rem; }
	h4, h5, h6 { font-size: 1.125rem; }

	.MasterLegend {
		padding-left: calc(((100dvw - var(--max-width)) / 2) + 1.25rem);
		padding-right: calc(((100dvw - var(--max-width)) / 2) + 1.25rem);
		padding-bottom: 2rem;
		background-color: transparent;
		border: none;
		
	}
	
	.MasterLegend::before {
		min-width: 135px;
		min-height: 52px;
		align-self: center;
	}

	.MasterLegend::after {
		position: absolute;
		bottom: 0;
		left: 0;
		height: 100%;
		width: 100%;
		content: "";
		background-image: var(--header-bg);
		background-size: cover;
		background-repeat: no-repeat;
		z-index: -1;
	}

	.Footer::before {
		aspect-ratio: 19 / 3;
    	background: var(--footer-img);
		background-repeat: no-repeat;
		background-size: cover;
		background-position: bottom center;
		background-color: var(--rg-white-color);
	}
}