/* Style Sheet for Meeting Minutes */

/* importing fnots */
.comic-relief-regular {
  font-family: "Comic Relief", system-ui;
  font-weight: 400;
  font-style: normal;
}

.comic-relief-bold {
  font-family: "Comic Relief", system-ui;
  font-weight: 700;
  font-style: normal;
}

.cedarville-cursive-regular {
  font-family: "Cedarville Cursive", cursive;
  font-weight: 400;
  font-style: normal;
}


/* changing the font of main */
main {
    font-family: "Comic Relief", system-ui;
}

/* CSS variables */
:root {
    --main-color: #0457A0;
    --text-color: #FFF56C;
}

/* CSS variables & Fallback example, and background style*/
body {
    background-color: var(--main-color, darkblue);
}


/* Grid layout for navigation */
nav ul {
    display: grid; 
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    gap: 5px;
    align-items: start;
    justify-items: start;
}

/* class selector: highlight */
.highlight {
    background-color: yellow; 
} 
/* h4 styling: hidden */
h4 {
    display: none; 
}

/* Selector list + ID Selector + element selector */
#title, em {
    color: red; 
}

p * {
    font-family: 'Courier New', Courier, monospace;
}
/* Header styling: background, color, text alignment, font size */
header {
    background-color: hsl(56, 100%, 71%); 
    color: darkblue;
    text-align: center;
    margin-top: 5vh; /* relative unit */
    margin-bottom: 5vh;
    margin-left: 2vh;
    margin-right: 2vh;
    font-size: 12pt; /* absolute unit */
    padding-top: 10px;
    border: 2px solid red; 
    position: sticky;
    z-index: 1000;
    top: 0; 
    /* nested selector + long padinng */ 
    & nav {
        padding-top: 10px;
        padding-bottom: 10px;
        padding-right: 20px;
        padding-left: 20px;
        max-width: 100%; 
    }
}

/* h1, h2, h3 styling: color, text alignment, font family, text decoration */
h1 {
    color:rgb(249, 249, 247);
    text-align: center;
    font-family: 'Cedarville Cursive', cursive;
}

h2 {
    color: color-mix(in srgb, #724a16 60%, yellow 40%);
}

/* combinators: adjacent sibling */
h2 + h3 {
    font-style: italic; 
}
/* combinators: descendany */ 
section h3 {
    text-decoration: underline lightblue;
    color: var(--text-color, yellow); 
}

/* combinators: child */
ol > li {
    font-style: italic; 
}

p {
   font-size: 0.50cm; /* absolute unit */
}

/* attribute selector */ 
li[class="person"] { 
    font-weight: bold;
}

/* psued-code selector */
p::first-letter {
    font-weight: bold;
}
/* Image styling: inline display, border, ratio */
img {
    margin: auto; 
    border-style: solid;
    border-color: color(display-p3 1 0 0);
    border-width: 2px;
    border-radius: 5px;
    display: inline;
    width: 5cm;
    height: 5cm; 
}
section {
    border-width: 2px; /* absolute unit */
    font-size: 1.5em; /* relative unit */
}

li.person {
    text-decoration: underline;
}

/* :has() selector */
li:has(.highlight) {
    font-size: 0.90em; 
}

legend {
    color: color(display-p3 1 0 0);
    margin: 12px 12px 8px 8px; /* absolute unit */

}

/* Form styling : block display, padding, etc.*/
form {
    padding: 8px 8px 16px 16px; /* absolute unit */
    width: 80%; /* relative unit */
    text-align: left;
    display: block;
    min-width: 300px; 
    position: relative;
}

/* Positioning example */
footer {
    position: fixed; 
    bottom: 0;
    width: 7cm;
    background: var(--main-color, darkblue);
    color: var(--text-color, lightyellow); 
}

/* Pseudo-classes */
button:hover {
    color: color(display-p3 1 0 0); 
}

details:active {
    color: color(display-p3 1 0 0);
}
/* Flexbox example */
form input {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

fieldset p {
  margin: 10px 0 4px;
  font-weight: 600;
}
/* combinator: general sibling */
form input ~ p {
  font-style: italic; 
}

/* Media query for responsiveness */
@media (max-width: 768px) {

    body {
    font-size: 18px;
    }
    nav ul {
    grid-template-columns: 1fr;
    gap: 10px;
    }

    form {
    width: 100%;
    }

    input, textarea, select {
    max-width: 100%;
    }

    main {
    grid-template-columns: 1fr;
    gap: 15px;
    }
}