:root {
    --font-family: "Montserrat Alternates" , sans-serif;
    --font-weight: 400;
    --font-size: 1rem;
    --font-style: normal;

    --main-font: var(--font-style) var(--font-weight) var(--font-size)var(--font-family);

    --bg-color: #f0f0f0;
    --note-color: #fffd75;
    --text-color: #333;

    }


html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
}

header, footer {
    flex-shrink: 0;
    background-color: #fbcfb2;
    padding: 1em;
    text-align: center;
}

header {
    height: 8vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer {
    height: 10vh;
}

main {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    container-type: inline-size;
    container-name: main-container;
}

form {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

textarea {
    width: 100%;
    height: 100px;
    padding: 5px;
    margin: 10px 0;
    border: 0.1rem solid darkgrey;
    border-radius: 8px;
    font: var(--main-font);
}

button {
    padding: 8px 14px;
    cursor: pointer;
    border-radius: 8px;
    border: 0.1rem solid #fbcfb2;
    background-color: #fbcfb2;
    font: var(--main-font);
}

#response {
    margin: 20px auto 0;
    max-width: 600px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: none;
    white-space: pre-wrap;
    font: var(--main-font);
}

#gallery {
    background-color: rgb(255, 255, 255);
    width: 100%;
    margin: 0 auto;
}

@container main-container (width < 600px) {
    #gallery td {
        display: block;
        width: 100%;
    }
}

.icons {
    display: flex;
    align-items: center;
}

.icons img {
    height: 20px;
    margin-left: 15px;
    cursor: pointer;
}

.error {
    border-color: red;
    color: red;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}
td {
    /* width: 50%;
    padding: 10px; */
    text-align: center;
    vertical-align: middle;
}
table img {
    max-width: 70%;
    height: auto;
}

#logo {
  font-family: "Montserrat Alternates", sans-serif;
  font-weight: 400;
  font-size: 2rem;
  font-style: normal;
}

#small-logo {
  font-family: "Montserrat Alternates", serif;
  font-weight: 300;
  font-size: 1rem;
  font-style: normal;
}

.message-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.message-container .message-box {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
    text-align: center;
}

#message-text {
    white-space: pre-line;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.hidden {
    display: none;
}


/* POST-IT STYLES  */

#post-it-container {
  display: none;
  grid-template-columns: 1fr; /* Mobile-first: default to 1 column */
  gap: 30px;
  margin-top: 20px;
  padding: 40px;
  background-color: #e0e0e0; /* Corkboard feel */
}

#post-it-container.visible {
    display: grid;
}

/* Apply 2-column layout on screens wider than 768px */
@media (min-width: 769px) {
  #post-it-container.visible {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.post-it {
  background-color: var(--note-color);
  aspect-ratio: 16 / 9;
  padding: 20px;
  box-shadow: 5px 5px 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
  position: relative;
  max-width: 350px;
  min-width: 270px;
  margin: 20px auto;
}

/* Random rotation for realism */
.post-it:nth-child(even) { transform: rotate(2deg); }
.post-it:nth-child(odd) { transform: rotate(-2deg); }
.post-it:hover { transform: scale(1.05) rotate(0deg); z-index: 10; }

.tag {
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  color: #777;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  margin-bottom: 10px;
  padding-bottom: 5px;
}

.content {
  flex-grow: 1;
  font-family: 'Segoe Print', 'Comic Sans MS', cursive; /* Handwritten look */
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--text-color);
  overflow-wrap: break-word;
}

.postit-footer {
  display: flex;  justify-content: space-between;
  font-size: 0.8rem;
  color: #555;
  margin-top: 15px;
  border-top: 1px solid rgba(0,0,0,0.05);
  padding-top: 5px;
}

.author { font-weight: 600; }

/* END OF POST-IT STYLES  */