/* Import font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/* GLOBAL STYLING */
* {
 padding: 0;
 margin: 0;
 box-sizing: border-box;
 font-family: "Montserrat", sans-serif;
}

/* STYLE STRUCTURAL AREAS */
/* HEADER AND NAV */
header {
    background-color: tomato;
    display: flex;
    gap: 20px;
    height: 40px;
    align-items: center;
}

/* Update nav list */
header nav ul li {
    list-style: none;
}

header nav ul {
    display: flex;
    justify-content: space-around;
}

header h1 {
    padding-left: 20px;
    color: white;
}

header nav {
    flex: 1;
    padding-right: 20px;
}

header nav ul li a {
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    position: relative;
}

/* Animations for nav links when hover and active*/
#top_nav a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: #FFFFFF;
    border-radius: 5px;
    left: 0px;
    bottom: -5px;
    transform: scaleX(0);
    transition: transform 0.5s;
    transform-origin: right;
}

#top_nav a:hover::after {
    transform-origin: left;
    transform: scaleX(1);
}

#top_nav a.active_now_link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: #FFFFFF;
    border-radius: 5px;
    left: 0px;
    bottom: -5px;
    transform: scaleX(1);
}

/* MAIN */
main {
    padding: 20px;
}

/* FOOTER */
footer {
    background-color: chartreuse;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
}

footer p {
    text-align: center;
    height: 30px;
    line-height: 30px;
}

footer ul {
    position: absolute;
    bottom: 0;
    right: 20px;
    display: flex;
    width: 100px;
    justify-content: space-between;
}

footer ul li {
    list-style: none;
}

footer ul li a {
    font-size: 23px;
    /* text-decoration: none; */
}

/* Icon styling */
/*i {

} */

/* MESSAGE STYLING */
.success, .error, .warning {
    position: absolute;
    /* top: 10%; */
    color: white;
    font-size: 30px;
    padding: 20px;
    border-radius: 10px;
    /* margin: 0 auto; */
    /* z-index: 10; */
}

.success {
    background-color: green;
}

.error {
    background-color: red;
}

.warning {
    background-color: orange;
}

.msg_cont {
    display: flex;
    justify-content: center;
    /* Stop to scroll bar appearning when animations dissapear */
    width: 100%;
    overflow-x: hidden;
    position: fixed;
    height: 100%;
    /* THIS KEEPS BLOCKING MY NAV BAR */
    /* z-index: 10; */
}

.input-box.error_border {
    border-bottom: 2px solid red;
}

.input-box.error_border label,
.input-box.error_border i {
    color: red;
}

/* **** LOGIN FORM / REGISTRATION FORM **** */

#blanket {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, .5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wrapper {
    position: relative;
    width: 400px;
    height: 480px;
    background-color: rgba(255, 255, 255, 0.8);
    border: 2px, solid, rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    /* display: flex; */
    /* justify-content: center; */
    align-items: center;
    overflow: hidden;
}

#frame {
    display: flex;
    width: 1200px;
    align-items: center;
    justify-content: space-between;
    transition: 0.4s;
    transform: translateX(-400px);
}

#close_popup {
    position: absolute;
    top: 0;
    right: 0;
    display: block;
    width: 45px;
    height: 45px;
    background-color: #162938;
    color: #FFFFFF;
    line-height: 45px;
    text-align: center;
    font-size: 1.8em;
    border-radius: 0 20px;
    cursor: pointer;
    z-index: 10;
}

.form-box {
    width: 100%;
    padding: 40px;
}

.form-box form {
    width: 320px;
}

.form-box h2 {
    text-align: center;
    font-size: 2em;
    color: #162938;
}

.input-box {
    position: relative;
    width: 100%;
    height: 50px;
    border-bottom: 2px solid #162938;
    margin: 30px 0px;
}

.register .input-box:first-child {
    margin-top: 10px;
}

.input-box input {
    width: 100%;
    height: 100%;
    background-color: transparent;
    border: none;
    outline: none;
    font-size: 1em;
    color: #162938;
    font-weight: 600;
    padding: 0 35px 0 5px;
}

.input-box label {
    position: absolute;
    top: 50%;
    left: 5px;
    font-size: 1em;
    color: #162938;
    font-weight: 500;
    pointer-events: none;
    transition: 0.5s;
    transform: translateY(-50%);
}

.input-box .icon {
    position: absolute;
    right: 3px;
    font-size: 1.2em;
    color: #162938;
    line-height: 57px;
}

.input-box input:focus~label, .input-box input:valid~label, #disabled_label {
/* .input-box input:focus~label { */
    top: -5px;
}

.remember-forgot {
    display: flex;
    font-size: 0.9em;
    color: #162938;
    font-weight: 500;
    justify-content: space-between;
    margin: -15px 0 15px 0;
}

.remember-forgot label input {
    accent-color: #162938;
    margin-right: 3px;
}

.remember-forgot a {
    color: #162938;
    text-decoration: none;
}


.remember-forgot a:hover {
    text-decoration: underline;
}

.btn {
    width: 100%;
    height: 45px;
    background-color: #162938;
    color: #FFFFFF;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    border: none;
    outline: none;
    border-radius: 6px;
}

.login-register {
    font-size: 0.9em;
    color: #162938;
    text-align: center;
    font-weight: 500;
    margin: 25px 0 10px 0;
}

.login-register p a {
    color: #162938;
    text-decoration: none;
    font-weight: 600;
}

.remember-register p a:hover {
    text-decoration: underline;
}

#restore_form {
    /* Stretch it over the page */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content:  center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0, 0.4);
}


/* **** SEARCH BAR **** */

#search_cont {
    display: flex;
    justify-content: center;
}

#search {
    width: 300px;
    font-size: 20px;
    padding: 10px;
    border-radius: 10px 0 0 10px;
    outline: none;
    border: 1px solid #162938;
    color: #162938;
    font-weight: 500;
}

/* Search icon */

.bi-search {
    font-size: 20px;
    padding: 10px;
    border-radius: 0 10px 10px 0;
    border: 1px solid #162938;
}


/* **** TABLE STYLING **** */

#content_table {
 width: 100%;
 border-collapse: collapse;
 margin: 50px 0;
}

#content_table thead {
    background-color: chartreuse;
}

#content_table th, #content_table tbody td {
    border-bottom: 1px solid lightgrey;
    border-top: 1px solid lightgrey;
    padding: 8px 3px;
    font-size: 15px;
}

/* Set every second row a background colour */
#content_table tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* Table buttons */

.btn_cont {
    display: flex;
    gap: 5px;
}

.tbl_btn {
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    border: 3px solid transparent;
    outline: none;
    border-radius: 5px;
    background-color: transparent;
    color: #f2f2f2;
    text-shadow: 0 0 2px black;
    padding: 3px;
}

.tbl_btn:hover {
    color: red;
    border-color: red;
    text-shadow: 0 0 3px red;
}

#content_table tfoot .btn {
    margin: 40px 0;
}

/* .edit_btn {

}

.delete_btn {

} */



/* **** NEW PAGE FORM **** */

#form_container h2 {
    text-align: center;
    font-size: 28px;
    margin: 25px;
}

.input_box {
    margin: 30px 0;
}

.input_box label, .input_box input, .input_box select, .input_box textarea {
    padding : 5px;
    font-size: 20px;

}

.display_flex {
    display: flex;
    gap: 10px;
}

textarea#content {
    width: 100%;
    min-height: 200px;
    resize: vertical;
    padding: 20px;
    line-height: 28px;;
}

/* Buttons for new page form */

.display_flex1 {

    display: flex;
    width: 100%;
    gap: 20px;
    height: 50px;
}

#cancel_form, #create_new_page1, #edit_page {
    flex: 1;
}