:root {
    --white: #FFFFFF;
    --white-opacity: rgba(255, 255, 255, 0.4);
    --dark-blue: #131E59;
    --datk-blue-opacity: rgba( 19, 31, 89, 0.1);
    --dark-blue-blend: #4C5481;
    --light-blue: #0096FF;
    --light-grey: #F3F4F7;
    font-size: 16px;
}

body {
    font-family: "Nunito Sans", sans-serif;
    background: var(--light-grey);
    margin: 0;
}

.header__background {
    background: var(--dark-blue) url("/static/pics/codya-header.jpg") no-repeat center top;
    padding: 25vh 15px;
    background-size: cover;
}

.page-title {
    color: var(--white);
    font-size: 2.5em;
    font-weight: bold;
    letter-spacing: 4px;
    padding: 2rem 0;
    margin: 0;
    text-align: center
}

.esmlouva__button {
    border: 3px solid var(--dark-blue);
    border-radius: 5px;
    padding: 0.3rem 0.7rem;
    background: var(--dark-blue-blend);
    color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 2.75rem;
}

.esmlouva__button:hover {
    border: 3px solid var(--light-blue);
    background: var(--light-blue);
    color: var(--white);
    text-decoration: none;
    transition: all .25s;
}

.esmlouva__button--text {
    margin-left: 0.5rem;
    font-weight: bold;
    letter-spacing: 2px;
}

.esmlouva__message--error {
    background: #ffeaea;
    border-color: #f23a3a;
    color: #f23a3a;
    width: 100%;
    max-width: 30rem;
    border-style: solid;
    border-width: 3px;
    border-radius: 5px;
    padding: 5px 12px;
}

.esmlouva__message--success {
    color: #559c43;
    border-color: #559c43;
    background: #f5fff5;
    width: 100%;
    max-width: 30rem;
    border-style: solid;
    border-width: 3px;
    border-radius: 5px;
    padding: 5px 12px;
}


.esmlouva__custom-alert {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.esmlouva__title-block {
    background: var(--white);
    max-width: 80rem;
    margin: -45vh auto 1.5rem auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px 0 rgba(19, 30, 89, .2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.esmlouva__block {
    background: var(--white);
    max-width: 80rem;
    margin: 0 auto 1.5rem auto;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px 0 rgba(19, 30, 89, .2);
    display: flex;
    flex-direction: column;
}

.esmlouva__title-block--title {
    margin: 1.5rem;
    font-weight: 800;
    font-size: 3rem;
    letter-spacing: 0.3rem;
    color: var(--dark-blue);
    text-align: center;
}

.esmlouva__title-block--logo {
    max-height: 8rem;
    margin: 1rem;
}

.esmlouvy__custom-alert--content {
    display: block;
    background-color: #fefefe;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    border: 1px solid #888;
    width: 35%;
}

.margin-bottom-1 {
    margin-bottom: 1rem;
}

.margin-top-1 {
    margin-top: 1rem;
}

@media screen and (min-width: 1920px) {
    :root {
        font-size: 18px;
    }
}

@media screen and (max-width: 83rem) {
    .esmlouva__title-block {
        margin: -45vh 1.5rem 1.5rem 1.5rem;
    }

    .esmlouva__block {
        margin: 0 1.5rem 1.5rem 1.5rem;
    }
}

@media screen and (max-width: 950px) {
    :root {
        font-size: 14px;
    }
    .esmlouva__title-block--logo {
        display: none
    }

    .esmlouva__title-block {
        justify-content: center;
    }
}

@media screen and (max-width: 768px) {
    .esmlouvy__custom-alert--content {
        width: 90%;
    }
}

@media screen and (max-width: 600px) {
    :root {
        font-size: 12px;
    }

    .esmlouva__button {
        height: 3.25rem;
    }
}

.tooltip-link {
    font-size: 10px;
}

label .tooltip-link {
    padding-left: 5px;
}

.label-tooltip {
    display: inline-flex;
}


a[data-tooltip].top {
	&:before,
	&:after {
		transform: translateY(10px);
	}
	
	&:hover:after,
	&:hover:before {
		transform: translateY(0px);
	}
}

a[data-tooltip] {
	position: relative;

	&:after,
	&:before {
		position: absolute;
		visibility: hidden;
		opacity: 0;
		transition: transform 200ms ease, opacity 200ms;
		box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
		z-index: 99;
	}

	&:before {
		content: attr(data-tooltip);
		background: #000;
		color: #fff;
		font-size: 12px;
		padding: 10px 15px;
		border-radius: 5px;
		white-space: normal;
		word-break: break-word;
		text-decoration: none;
		letter-spacing: 1px;
        min-width: 250px;
	}

	&:after {
		width: 0;
		height: 0;
		border: 6px solid transparent;
		content: '';
	}

	&:hover:after,
	&:hover:before {
		visibility: visible;
		opacity: 0.85;
		transform: translateY(0px);
	}
}

a[data-tooltip][data-position="top"]:before {
	bottom: 100%;
	left: -50%;
	transform: translateX(-50%);
	margin-bottom: 10px;
}

a[data-tooltip][data-position="top"]:after {
	border-top-color: #000;
	border-bottom: none;
	bottom: 101%;
	left: calc(50% - 6px);
	margin-bottom: 4px;
}

@media screen and (max-width: 880px) {
    a[data-tooltip] {
        position: relative;
    
        &:after,
        &:before {
            position: absolute;
            visibility: hidden;
            opacity: 0;
            transition: transform 200ms ease, opacity 200ms;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
            z-index: 99;
            max-width: 90vw;
            word-wrap: break-word;
        }
    
        &:before {
            content: attr(data-tooltip);
            background: #000;
            color: #fff;
            font-size: 12px;
            padding: 10px 15px;
            border-radius: 5px;
            white-space: normal;
            word-break: break-word;
            text-decoration: none;
            letter-spacing: 1px;
            min-width: 150px;
            max-width: 90vw; /* Prevents overflow */
            left: 50%;
            transform: translateX(-50%)!important;
        }
    
        &:after {
            width: 0;
            height: 0;
            border: 6px solid transparent;
            content: '';
            left: 50%;
            transform: translateX(-50%)!important;
        }
    
        &:hover:after,
        &:hover:before {
            visibility: visible;
            opacity: 0.85;
            transform: translateY(0px)!important;
        }
    }

    a[data-tooltip][data-position="top"] {
        &:before {
            left: auto;
            right: 50%;
            transform: translateX(50%)!important;
        }
        
        &:after {
            left: auto;
            right: 50%;
            transform: translateX(50%)!important;
        }
    }
}
