/* fonts Poppins */

@font-face {
    font-family: Poppins;
    src: url(../fonts/Poppins-Regular.ttf);
    font-weight: normal;
}

@font-face {
    font-family: Poppins;
    src: url(../fonts/Poppins-ExtraBold.ttf);
    font-weight: bold;
}

/* CSS reset */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

li {
    list-style: none;
}

a {
    text-decoration: none;
}

/* Global */

:root {
     --black: #414042;
     --red: #ff5757;
     --shield-blue: #8797ee;
     --grey: #D3D3D3;
     --green: #00D100;
}

html {
    font-size: 62.5%;
    font-family: 'Poppins', 'Verdana';
}

body {
    min-height: 100vh;
    padding-top: 70px;
    display: flex;
    flex-direction: column;
    background-image: url(../images/background.png);
}

/* Global Navigation */

.application-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1;
    box-shadow: 0 0 10px var(--black);
    border-radius: 0 0 10px 10px;
    background-color: white;
}

.application-navbar {
    display: flex;
    justify-content: center;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding: 20px;
}

.nav-logo img {
    margin-top: 10px;
}

.nav-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-item {
    margin-left: 5rem;
}

.nav-link {
    font-size: 2rem;
    font-weight: 500;
    color: var(--black);
}

.nav-link:hover {
    color: var(--shield-blue);
}

.bar-menu {
    display: none;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: var(--black);
}

.nav-registration button {
    font-family: 'Poppins', 'Verdana';
    width: fit-content;
    border: none;
    background-color: white;
}

.nav-registration button:hover {
    cursor: pointer;
}

/* Global Footer */

.application-footer {
    margin-top: auto;
    background: var(--black);
    text-align: center;
    height: 100px;
    color: white;
    width: 100%;
    padding: 50px 0 0 0;
    clip-path: polygon(0 30px, 100% 0, 100% 100%, 0 100%);
}

.application-footer>p {
    font-size: 1.2rem;
}

/* error */

.container-error {
    margin: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    flex: 1;
    flex-direction: column;
}

.container-error img {
    border-radius: 5px;
    border: .1rem solid rgba(0, 0, 0, .2);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
    width: 40%;
}

.container-error .back {
    margin: 10px;
    padding: 8px 16px;
    background-color: var(--black);
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    width: 100px;
}

.container-error .back:hover {
    filter: brightness(115%) contrast(85%);
}
/* home page */

.index-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    margin: 50px;
}

.index-article {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    border: .1rem solid rgba(0, 0, 0, .2);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
    border-radius: 50px;
    padding: 0 20px;
    background-color: white;
}

.index-article h2 {
    margin: 0.8rem;
    font-size: 5rem;
}

.index-article p {
    margin: 0.8rem;
    font-size: 3rem;
}

.index-section a {
    color: var(--shield-blue)
}

/* container-center */

.container {
    margin: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    flex: 1;
}

.article-container {
    background-color: white;
    border: .1rem solid rgba(0, 0, 0, .2);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
    border-radius: 50px;
    padding: 30px;
    width: 75vh;
    height: auto;
}

.article-container h3 {
    font-size: 2rem;
}

.article-container li {
    font-size: 1.5rem;
}

.article-container li span {
    font-weight: 600;
    color: var(--shield-blue);
}

.article-container h2 {
    text-align: center;
    padding-bottom: 2rem;
    font-size: 3rem;
}

.section-container form {
    display: flex;
    flex-direction: column;
}

.section-container label {
    margin-bottom: 10px;
    font-size: 1.75rem;
    text-align: left;
}

.section-container .email,
.section-container input[type="password"],
.section-container input[type="text"],
.section-container input[type="date"]{
    width: 100%;
    padding: 5px;
    border-radius: 3px;
    border: .1rem solid rgba(0, 0, 0, .2);
}

.section-container .back,
.section-container input[type="submit"],
.section-container input[type="button"] {
    margin: 10px;
    padding: 8px 16px;
    background-color: var(--black);
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    width: 100px;
}

.section-container {
    text-align: center;
    margin: 10px;
}

.section-container .back:hover,
.section-container input[type="submit"]:hover,
.section-container input[type="button"]:hover {
    filter: brightness(115%) contrast(85%);
}

.section-container .email:hover,
.section-container input[type="password"]:hover,
.section-container input[type="text"]:hover,
.section-container input[type="date"]:hover{
    border: .1rem solid var(--shield-blue);
    cursor: pointer;
}

.section-container .back:focus,
.section-container input[type="submit"]:focus,
.section-container input[type="button"]:focus {
    outline: none;
}

.danger-text {
    font-size: 1.1rem;
    color: var(--red);
    margin-left: 9px;
}

.insurance-list-insurance {
    width: 100%;
    padding: 5px;
    border-radius: 3px;
    border: 0.1rem solid rgba(0, 0, 0, .2);
}

.insurance-list-insurance option {
    font-family: 'Poppins', 'Verdana';
    font-size: 1rem;
}

.insurance-list-insurance:hover {
    border: 0.1rem solid var(--shield-blue);
    cursor: pointer;
}

.section-container .dates {
    font-size: 1px;
}

/* flash message */

.flash-success {
    text-align: center;
    border: 1px solid var(--green);
    color: white;
    background-color: var(--green);
    height: 20px;
    font-size: 1.1rem;
    width: 100%;
    border-radius: 5px;
}

.flash-error {
    text-align: center;
    border: 1px solid var(--red);
    color: white;
    background-color: var(--red);
    height: 20px;
    font-size: 1.1rem;
    width: 100%;
    border-radius: 5px;
}

/* container-table */

.container-table {
    width: 75%;
    margin: 5rem auto 0 auto;
}

.header-table-page {
    border: .1rem solid rgba(0, 0, 0, .2);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
    border-radius: 10px;
    padding: 10px 20px;
    background-color: white;
    margin: 2rem 0;
    flex-direction: column;
    width: 100%;
    justify-content: space-between;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.header-table-page h2 {
    font-size: 3rem;
}

.header-button button {
    padding: 11px;
    border-radius: 5px;
    border: none;
    margin: 0 6px;
    font-size: 1.4rem;
    color: white;
    font-weight: bold;
}

.header-button button:hover {
    filter: brightness(115%) contrast(85%);
    cursor: pointer;
}

.header-button .add {
    background-color: var(--black);
    width: 80px;
}

.header-button .back {
    background-color: var(--black);
    width: 80px;
}

/* table */

.table-container {
    background-color: white;
    border: .1rem solid rgba(0, 0, 0, .2);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
    border-radius: 10px;
    padding: 10px 20px;
    margin: 2rem 0;
    text-align: center;
}

.table {
    border-collapse: collapse;
    margin-top: 8px;
    width: 100%;
    position: relative;
}

.table th {
    font-size: 1.8rem;
}

.table td[data-label="Rodné číslo"] a {
    width: 12%;
}

.table td[data-label="Jméno"],
.table td[data-label="Příjmení"] {
    width: 16%;
}

.table td[data-label="Adresa"] {
    width: 38%;
}

.table td[data-label="Operace"] {
    width: 18%;
}

.table td[data-label="Rodné číslo"],
.table td[data-label="Jméno"],
.table td[data-label="Příjmení"] {
    font-size: 1.5rem;
    word-break: break-all;
}

.table td[data-label="Smlouva"],
.table td[data-label="Pojišťovna"],
.table td[data-label="Adresa"],
.table td[data-label="Pojištění"],
.table td[data-label="ID uživatele"],
.table td[data-label="Limit"] {
    font-size: 1.5rem;
    word-break: normal;
}

.table td[data-label="ID uživatele"] a,
.table td[data-label="Pojištění"] a,
.table td[data-label="Smlouva"] a,
.table td[data-label="Rodné číslo"] a {
    color: var(--shield-blue);
}

.table td,
.table th {
    border: 1px solid var(--black);
    padding: 8px;
}

.table tr:first-child th,
.table tbody tr th {
    border-top: none;
}

.table tr th:first-child,
.table tr th:last-child,
.table tr td:first-child,
.table tr td:last-child {
    border-left: none;
    border-right: none;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover {
    background-color: var(--grey);
}

.table button {
    padding: 8px 2px;
    border-radius: 5px;
    border: none;
    margin: 3px 6px;
    font-size: 1.4rem;
    color: white;
    font-weight: bold;
}

.table button:hover {
    filter: brightness(115%) contrast(85%);
    cursor: pointer;
}

.table .edit {
    background-color: var(--black);
    width: 80px;
}

.table .delete {
    background-color: var(--red);
    width: 80px;
}

/* Detail of insured */

.container-detail-insured {
    background-color: white;
    border: .1rem solid rgba(0, 0, 0, .2);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
    border-radius: 10px;
    padding: 10px 20px;
    width: 75%;
    margin: 5rem auto 0 auto;
}

.article-detail-insured {
    display: flex;
}

.section-detail-insured {
    background-color: white;
    border: .1rem solid rgba(0, 0, 0, .2);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
    border-radius: 10px;
    padding: 10px 20px;
    margin: 1rem 1rem;
    width: 33%;
}

.section-detail-insured h2 {
    font-size: 1.8rem;
}

.section-detail-insured p {
    font-size: 1.2rem;
}

.section-detail-insured a {
    color: var(--shield-blue);
}

.section-detail-insured .input-detail:hover {
    filter: brightness(115%) contrast(85%);
    border: .1rem solid var(--shield-blue);
    cursor: pointer;
}

.section-detail-insured .input-detail:focus {
    outline: none;
}

.section-detail-insured .input-detail {
    width: 100%;
    padding: 5px;
    border-radius: 3px;
    border: .1rem solid rgba(0, 0, 0, .2);
    margin-bottom: 10px;
    font-size: 1.5rem;
    text-align: left;
    overflow-x: auto;
}


.container-detail-insured button {
    padding: 8px 2px;
    border-radius: 5px;
    border: none;
    margin: 0px 6px 10px 0px;
    font-size: 1.4rem;
    color: white;
    font-weight: bold;
}

.container-detail-insured button:hover {
    filter: brightness(115%) contrast(85%);
    cursor: pointer;
}

.container-detail-insured .edit {
    background-color: var(--black);
    width: 80px;
}

.container-detail-insured .delete {
    background-color: var(--red);
    width: 80px;
}

.container-detail-insured .add-insurance {
    background-color: var(--black);
    width: 100px;
}

/* Detail of insuranceList */

.container-detail-insurance-list {
    background-color: white;
    border: .1rem solid rgba(0, 0, 0, .2);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
    border-radius: 10px;
    padding: 10px 20px;
    width: 75%;
    margin: 5rem auto 0 auto;
}

.section-detail-insurance-list h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.section-detail-insurance-list p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.section-detail-insurance-list .input-detail-insurance-list:hover {
    filter: brightness(115%) contrast(85%);
    border: .1rem solid var(--shield-blue);
    cursor: pointer;
}

.section-detail-insurance-list .input-detail-insurance-list:focus {
    outline: none;
}

.section-detail-insurance-list .input-detail-insurance-list {
    width: 100%;
    padding: 5px;
    border-radius: 3px;
    border: .1rem solid rgba(0, 0, 0, .2);
    margin-bottom: 10px;
    font-size: 1.5rem;
    text-align: left;
    overflow-x: auto;
}

.container-detail-insurance-list button {
    padding: 8px 2px;
    border-radius: 5px;
    border: none;
    margin: 0px 6px 10px 0px;
    font-size: 1.4rem;
    color: white;
    font-weight: bold;
}

.container-detail-insurance-list button:hover {
    filter: brightness(115%) contrast(85%);
    cursor: pointer;
}

.container-detail-insurance-list .edit {
    background-color: var(--black);
    width: 80px;
}

.container-detail-insurance-list .delete {
    background-color: var(--red);
    width: 80px;
}

/* delete form */

.article-delete {
    display: flex;
    justify-content: center;
    align-items: center;
    text-direction: column;
}

.section-delete {
    background-color: white;
    border: .1rem solid rgba(0, 0, 0, .2);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
    border-radius: 10px;
    padding: 10px 20px;
    margin: 3rem 1rem;
    max-width: 400px;
}

.section-delete h2 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 1rem;
}

.section-delete p {
    font-size: 1.2rem;
}

.section-delete .input-detail:hover {
    filter: brightness(115%) contrast(85%);
    border: .1rem solid var(--shield-blue);
    cursor: pointer;
}

.section-delete .input-detail:focus {
    outline: none;
}

.section-delete .input-detail {
    width: 100%;
    padding: 5px;
    border-radius: 3px;
    border: .1rem solid rgba(0, 0, 0, .2);
    margin-bottom: 10px;
    font-size: 1.5rem;
    text-align: left;
    overflow-x: auto;
}

.section-delete button {
    padding: 8px 2px;
    border-radius: 5px;
    border: none;
    margin: 0px 6px 10px 0px;
    font-size: 1.4rem;
    color: white;
    font-weight: bold;
}

.section-delete .delete-form-button {
    text-align: center;
}

.section-delete button:hover {
    filter: brightness(115%) contrast(85%);
    cursor: pointer;
}

.section-delete .edit {
    background-color: var(--black);
    width: 80px;
}

.section-delete .delete {
    background-color: var(--red);
    width: 80px;
}

/* Breakpoints */

@media all and (max-width: 865px) {

    .nav-menu {
        position: fixed;
        left: 100%;
        top: 8rem;
        flex-direction: column;
        background-color: var(--black);
        border: .1rem solid rgba(0, 0, 0, .2);
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
        width: 50%;
        border-radius: 10px;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    }

    .nav-registration {
        position: fixed;
        left: 100%;
        top: 8rem;
        flex-direction: column;
        background-color: var(--black);
        border: .1rem solid rgba(0, 0, 0, .2);
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
        width: 50%;
        border-radius: 10px;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    }

    .nav-menu.active {
        left: 50%;
    }

    .nav-registration.active {
        left: 0%;
    }

    .nav-item {
        margin: 2.5rem 0;
    }

    .nav-link {
        color: white;
    }

    .bar-menu {
        display: block;
        cursor: pointer;
    }

    .nav-registration button {
        background-color: var(--black);
    }

    /* icon menu animation */

    .bar-menu.active .bar:nth-child(2) {
        opacity: 0;
    }

    .bar-menu.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .bar-menu.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* index page */

    .index-container {
        margin: 5px;
    }

    .index-article h2 {
        margin-left: 2rem;
        font-size: 3.5rem;
    }

    .index-article p {
        font-size: 2.5rem;
        margin: 0.8rem;
    }

    /* table of insured */

    .table-container {
        display: contents;
    }

    .table-head {
        display: none;
    }

    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100%;
    }

    .table tr {
        margin-bottom: 15px;
        background-color: white;
        border: .1rem solid rgba(0, 0, 0, .2);
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
        border-radius: 10px;
        padding: 10px 20px;
        margin: 2rem 0;
    }

    .table tr td:first-child {
        border-top: none;
    }

    .table tr td:last-child {
        border-bottom: none;
    }

    .table td {
        border-left: none;
        border-right: none;
    }

    .table tbody tr td {
        text-align: right;
        padding-left: 50%;
        position: relative;
    }

    .table td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 50%;
        padding-left: 5px;
        font-weight: 600;
        font-size: 14px;
        text-align: left;
    }

    .table button {
        font-size: 1.4rem;
        font-weight: bold;
    }

    .table .edit {
        background-color: var(--black);
        width: 80px;
    }

    .table .delete {
        background-color: var(--red);
        width: 80px;
    }

    .table td[data-label="Rodné číslo"],
    .table td[data-label="Jméno"],
    .table td[data-label="Příjmení"],
    .table td[data-label="Adresa"],
    .table td[data-label="Operace"] {
        width: 100%;
    }

    .table tr:hover {
        background-color: white;
    }
}

@media all and (max-width: 800px) {

    .header-table-page {
        flex-direction: column;
        text-align: center;
    }

    .header-table-page h2 {
        margin-bottom: 12px;
    }

    .header-button button {
        margin: 5px 5px;
    }

    .article-detail-insured {
        display: block;
    }

    .section-detail-insured {
        width: 100%;
        margin: 7px auto;
    }

    .section-detail-insured h2 {
        font-size: 1.4rem;
    }

    .section-detail-insured p {
        font-size: 1rem;
    }

    .section-detail-insured .input-detail {
        width: 100%;
        padding: 5px;
        border-radius: 3px;
        border: .1rem solid rgba(0, 0, 0, .2);
        margin-bottom: 10px;
        font-size: 1.2rem;
        text-align: left;
        overflow-x: auto;
    }

    .section-detail-insurance-list h2 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .section-detail-insurance-list p {
        font-size: 1rem;
    }

    .section-detail-insurance-list .input-detail-insurance-list {
        font-size: 1.2rem;
    }
}

@media all and (max-width: 680px) {

    .index-article {
        padding: 0 2rem;
    }

    .index-article h2 {
        margin-left: 2rem;
        font-size: 3rem;
    }

    .index-article p {
        font-size: 2.2rem;
        margin: 0.8rem;
    }

    .container-error .error-image {
        width: 80%;
    }

    .container-table {
        margin-top: 2rem;
    }

    .container-detail-insurance-list {
        margin-top: 2rem;
    }

}


@media all and (max-width: 450px) {

    .index-article {
        flex-direction: column;
        gap: 0px;
        padding: 0 2rem;
    }

    .index-article h2 {
        margin-left: 2.3rem;
        font-size: 2.5rem;
    }

    .index-article p {
        font-size: 2rem;
        margin: 0.8rem;
    }

    .article-container h2 {
        text-align: center;
        padding-bottom: 2rem;
        font-size: 2rem;
    }

    .article-container label {
        font-size: 1.4rem;
    }

    .container-error .error-image {
        width: 100%;
    }

    .header-table-page h2 {
        font-size: 2rem;
    }

    .header-button button {
        font-size: 1.5rem;
    }

    .container-table {
        margin-top: 1.2rem;
    }

    .danger-text {
        font-size: 0.9rem;
    }

    .table button {
        padding: 5px 0;
        margin: 5px;
        border: none;
        margin: 2px 0;
        color: white;
        font-size: 10px;
    }

    .table .edit {
        background-color: var(--black);
        width: 60px;
    }

    .table .delete {
        background-color: var(--red);
        width: 60px;
    }

    .nav-link {
        font-size: 1.5rem;
    }

    .container-detail-insured {
        text-align: center;
    }

    .container-detail-insured button {
        font-size: 10px;
        font-weight: bold;
        padding: 5px 2px
    }

    .container-detail-insured .edit {
        background-color: var(--black);
        width: 60px;
    }

    .container-detail-insured .delete {
        background-color: var(--red);
        width: 60px;
    }

    .container-detail-insured .add-insurance {
        background-color: var(--black);
        width: 75px;
    }

    .container-detail-insurance-list button {
        font-size: 10px;
        padding: 5px 2px
    }

    .container-detail-insurance-list .edit {
        background-color: var(--black);
        width: 60px;
    }

    .container-detail-insurance-list .delete {
        background-color: var(--red);
        width: 60px;
    }

    .table td[data-label="Smlouva"],
    .table td[data-label="Pojišťovna"],
    .table td[data-label="Pojištění"],
    .table td[data-label="ID uživatele"],
    .table td[data-label="Limit"] {
        font-size: 10px;
    }

    .table td:before {
        font-size: 10px;
    }

    .section-detail-insurance-list {
        text-align: center;
    }
}

@media all and (max-width: 380px) {

    .index-article h2 {
        margin-left: 1.3rem;
        font-size: 2.5rem;
    }

    .index-article p {
        margin: 0.8rem;
    }

    .header-table-page h2 {
        font-size: 1.4rem;
    }

    .header-button .back,
    .header-button .add {
        font-size: 10px;
        width: 60px;
        padding: 5px 0;
    }

    .table td[data-label="Limit"],
    .table td[data-label="ID uživatele"],
    .table td[data-label="Pojištění"],
    .table td[data-label="Smlouva"],
    .table td[data-label="ID"],
    .table td[data-label="Jméno"],
    .table td[data-label="Příjmení"],
    .table td[data-label="Pojišťovna"],
    .table td[data-label="Adresa"],
    .table td[data-label="Rodné číslo"] {
        font-size: 10px;
    }

    .insurance-list-insurance option {
        font-size: 9px;
    }
}

@media all and (max-width: 240px) {

    .table td:before {
        display: none;
    }

    .table tbody tr td {
        text-align: center;
        padding-left: 0%;
    }
}