/******************** RESET ********************/
/************************************************/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
    text-decoration: none;
    box-sizing: border-box;
}
a:visited {
    text-decoration: none;
    color: inherit;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

@font-face {
    font-family: 'Roboto';
    src: url('/fonts/roboto-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('/fonts/roboto-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "fallback for roboto";
    src: local("Times New Roman");
    ascent-override: 190%;
    descent-override: 35%;
    line-gap-override: 10%;
}

/******************** GLOBAL ********************/
/************************************************/

:root {
    --card-min-width: calc(512px - 2rem);
    --black: rgb(50,50,50);
    --white: rgb(250,250,250);
    --green: #379563;
    --light-gray: rgb(200,200,200);
    --code-light-blue: #569cd6;
    --code-dark-blue: #0078d4;
    --code-light-yellow: #DCDCAA;
    --code-dark-yellow: #D7BA7D;
    --code-orange: #ce9178;
    --code-green: #6a9955; 
}

html {
    font-size: 16px;
    background-color: rgb(250,250,250);
    scroll-behavior: smooth;
    font-family: "Roboto", "fallback for roboto";
    tab-size: 4;
}

body {
    width: auto;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

a {
    color: inherit;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.1rem;
}

/********************* PARSER *********************/
/**************************************************/

.code {
    display: block;
    color: var(--white);
    padding: 1rem;
    border-radius: 5px;
    line-height: 1.2rem;
    background-color: #181818;
    overflow: auto;
}

.bold {
    font-weight: 600;
}

.code-light-blue {
    color: var(--code-light-blue);
}

.code-light-yellow {
    color: var(--code-light-yellow);
}

.code-dark-yellow {
    color: var(--code-dark-yellow);
}

.code-orange {
    color: var(--code-orange);
}

.code-green {
    color: var(--code-green);
}

.code-paren-1 { color: #ffd700; }
.code-paren-2 { color: #da70d6; }
.code-paren-3 { color: #179fff; }

.code-identifier {
    color: #9cdcfe;
}

/****************************** ALERTES ******************************/
/*********************************************************************/

.alert-form-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 1rem;
    position: fixed;
    top: 0;
    z-index: 20;
}

.alert-form {
    width: 100%;
    max-width: 1080px;
    padding: 1rem 2rem;
    border-radius: 10px;
    box-shadow: 0 0 10px rgb(0,0,0,0.3);
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 1rem;
    
    span {
        width: 15px;
        height: 20px;
        line-height: 20px;
        margin-left: auto;
        text-align: center;
        vertical-align: middle;
    }
    
    span:hover {
        cursor: pointer;
    }
}

.alert-form::before {
    content: '';
    width: 15px;
    height: 20px;
    background-color: var(--white);
    clip-path: polygon(100% 0, 100% 100%, 50% 65%, 0 100%, 0 0);
}

.--success {
    background-color: var(--green);
}

.--incomplete {
    background-color: var(--green);
    filter: hue-rotate(125deg);
}

.--error {
    background-color: var(--green);
    filter: hue-rotate(215deg);
}

/******************** HEADER ********************/
/************************************************/

header {
    width: auto;
    background-color: var(--black);
    color: var(--white);
}

header .div-h1 {
    width: auto;
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

header ul {
    display: flex;
    gap: 2rem;
}

header a, .btn-build  {
    display: block;
    padding: 1rem 1rem;
    
}

header li {
    display: flex;
    align-items: center;
}

header li:hover, .btn-build:hover {
    color: rgb(102,191,253);
    
}

.btn-build {
    border: none;
    background-color: inherit;
    color: var(--white);
    font-size: 1rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    
    header ul {
        display: none;
    }
}

/********************* MAIN *********************/
/************************************************/

main {
    width: auto;
    display: flex;
    gap: 1rem;
}

/********************* ASIDE *********************/
/*************************************************/

aside {
    min-width: 300px;
}

/************** SECTION WITH CARDS **************/
/************************************************/

#section-width-cards {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card {
    width: auto;
    padding: 1rem;
    border-radius: 5px;
    box-shadow: 0px 0px 10px rgb(0,0,0,0.10);
}

.card-content {
    white-space: pre-wrap;
}

.div-card-title {
    display: flex;
    justify-content: space-between;
}

.div-card-title h3 {
    padding-left: 1rem;
}

.div-card-title h3::first-letter {
    text-transform: uppercase;
}

@media (max-width: 768px) {
    
    #section-width-cards {
        display: flex;
        flex-direction: column;
    }
}

/******************** FOOTER ********************/
/************************************************/

footer {
    width: auto;
    background-color: var(--black);
    color: var(--white);
    display: flex;
    justify-content: center;
    padding: 1rem;
}

footer a:hover {
    color: var(--code-blue);
}

/********************* ADMIN *********************/
/*************************************************/

#admin-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#admin-section table {
    width: 100%;
    box-shadow: 0px 0px 10px rgb(0,0,0,0.10);
    border-collapse: collapse;
    table-layout: fixed;
}

#admin-section thead {
    background-color: var(--black);
    color: var(--white);
}

#admin-section tbody {
    background-color: #FFF;
}

#admin-section td, th {
    padding: 1rem;
}

#admin-section td, #admin-section th {
    border: 1px solid rgb(200,200,200);
}

#admin-section th:nth-child(1), td:nth-child(1) { 
    width: 10%;
    text-align: center;
}
#admin-section th:nth-child(2) {
    width: 10%;
}
#admin-section th:nth-child(3) {
    width: 70%;
}
#admin-section th:nth-child(4), td:nth-child(4) {
    width: 10%;
    text-align: center;
}

#admin-section .icon-edit:hover, #admin-section .icon-delete:hover {
    color: var(--code-blue);
    cursor: pointer;
}

#admin-section .icons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

#admin-section .icons img {
    width: 1.2rem;
}

#admin-section .icons img:hover {
    filter: invert(0.5) sepia(1) saturate(10) hue-rotate(200deg);
}

#update-card {
    box-shadow: 0px 0px 10px rgb(0,0,0,0.10);
    background-color: #FFF;
    padding: 1rem;
    position: relative;
}

#update-card form select {
    width: fit-content;
}

.btn-close {
    border: none;
    background-color: inherit;
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0;
}

.btn-close:hover {
    cursor: pointer;
}

#update-card form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#update-card input {
    max-width: 20rem;
    padding: .3rem;
}

#update-card textarea {
    min-height: 10rem;
    padding: .5rem;
}

#update-card select {
    min-width: 10rem;
    padding: .3rem 1rem .3rem .3rem;
}

#btn-submit {
    width: fit-content;
}

.btn-add-card {
    width: fit-content;
    padding: .5rem;
    background-color: var(--white);
    color: var(--black);
    border: 1px solid var(--light-gray);
    box-shadow: 0px 0px 10px rgb(0,0,0,0.10);
}

.btn-add-card:hover {
    background-color: var(--black);
    color: var(--white);
    cursor: pointer;
}

#confirmDialog {
    border: 1px solid var(--black);
    border-radius: 5px;
}

#confirmDialog[open] {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dialog-container-btn {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.dialog-container-btn button {
    padding: .3rem .5rem;
}