/* Root */
:root {
  --main-bg: hsl(210, 50%, 98%);
  --main-color: var(--fallback-color, navy);
}

/* Body */
body {
  background-color: var(--main-bg);
  color: var(--main-color);
  font-family: 'Roboto', sans-serif;
  margin: 0;
}

/* Navigation */
nav ul {
  list-style-type: none;
  background-color: #222;
  padding: 1rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

nav ul li a {
  color: white;
  text-decoration: none;
}

nav ul li a:hover {
  color: orange;
}

/* Headings */
h1, h2, h3, h4 {
  text-align: center;
  color: #004080;
}

/* Layouts */
.attendees, .nonattendees, .agenda, .postmeeting {
  display: inline-block;
  width: 45%;
  margin: 1rem;
  vertical-align: top;
  border: 2px solid #ccc;
  padding: 1rem;
  border-radius: 10px;
  background-color: #f9f9f9;
}

/* Grid  */
.images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 1rem;
  background-color: #e0f7fa;
}

.images img {
  max-width: 100%;
  border-radius: 8px;
}

/* Flexbox */
nav ul {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
}

/* Media */
@media (max-width: 768px) {
  .attendees, .nonattendees, .agenda, .postmeeting {
    width: 90%;
    display: block;
  }
  nav ul {
    flex-direction: column;
  }
}

/* Text Styling */
p {
  color: #333;
  line-height: 1.6;
}

/* Sizing */
img {
  height: auto;
  width: 100%;
  max-width: 300px;
  min-width: 100px;
}

/* Display */
footer {
  display: block;
}

summary {
  display: inline;
}

/* Box Model Margin */
.agenda {
  margin-top: 20px;
  margin-right: 10px;
  margin-bottom: 20px;
  margin-left: 10px;
}

.nonattendees {
  margin: 20px 10px 20px 10px; /* shorthand */
}

/* Box Model: Padding */
.attendees {
  padding-top: 10px;
  padding-bottom: 10px;
  padding-left: 15px;
  padding-right: 15px;
}

.postmeeting {
  padding: 10px 15px 10px 15px;
}

/* Borders */
.agenda {
  border-style: solid;
  border-width: 2px;
  border-color: #999;
  border-radius: 8px;
}

/* Position */
header {
  position: sticky;
  top: 0;
  background-color: white;
  z-index: 10;
}

footer {
  position: relative;
}

/* Pseudo-classes */
a:active {
  color: red;
}

button:hover {
  background-color: lightgreen;
}

/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');

/* Selectors */
.attendees > ul li {
  color: green;
}

.nonattendees + .agenda {
  background-color: #ffe0e0;
}

.agenda ~ .postmeeting {
  border-color: tomato;
}

.attendees, .nonattendees {
  font-size: 1rem;
}

/* New Selectors */
form:has(input[type="checkbox"]) {
  background-color: #f0f8ff;
  padding: 1rem;
}

/* Nested selector */
fieldset {
  display: block;
  padding: 1rem;
  background-color: #fff;
  border: 2px dashed #ccc;
  & label {
    color: #555;
  }
  & input[type="radio"]:hover {
    transform: scale(1.1);
  }
}
