/* ======= BASE ======= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: inherit;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f8f8f8;
    color: #222;
    line-height: 1.6;
}


a {
    text-decoration: none;
    color: inherit;
}

/* ======= HEADER ======= */
.main-header {
    background-color: #c20017;
    color: white;
    width: 100%;
    padding: 0.8rem 1.2rem;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 1rem;
    flex-wrap: wrap;
}

.logo-container {
    display: flex;
    align-items: center;
    max-width: 120px;
    flex: 0 0 auto;
}

.logo-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* ======= AUTH SECTION (LOGIN/LOGOUT) ======= */
.auth-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.login-form,
.logged-in-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    background-color: white;
    color: #333;
    border: 1px solid #ccc;
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    border-radius: 4px;
}

.header-nav-btn,
.logout-button,
.login-form input[type="submit"] {
    background-color: white;
    color: #c20017;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out;
    min-width: 100px;
}

.header-nav-btn:hover,
.logout-button:hover,
.login-form input[type="submit"]:hover {
    background-color: #eee;
}

.auth-logged-in {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    color: white;
    font-size: 0.9rem;
}

/* ======= MAIN CONTENT ======= */
main {
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.grouped-block__title {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: #fff;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}


.grouped-block__content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.entryblock {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
}

.entryblock__title {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: #c20017;
}

/* ======= TEXTAREAS / INPUT FIELDS ======= */
.textarea-bg {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-text-row,
.text-row {
    margin-bottom: 0.5rem;
}

.textarea-r {
    width: 100%;
    font-size: 1rem;
    font-weight: bold;  /* make text bold */
    padding: 0.5rem;
    resize: none;
    box-sizing: border-box;
    border: none;
    border-bottom: 2px solid #ff746c; /* red underline */
    background-color: transparent;
    color: #000; /* black text */
    -webkit-text-fill-color: #000001 !important; /* override iOS/Chrome autofill */
    user-select: none;
    pointer-events: none;
}


.form-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    resize: none;
}

/* ======= BUTTONS ======= */
.startPageButton,
.buttonPrimary,
.button-container button {
    padding: 0.5rem 1rem;
    background-color: #c20017;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    min-width: 100px;
}

.startPageButton:hover,
.buttonPrimary:hover,
.button-container button:hover {
    background-color: #a00014;
}

.inverted-button {
    padding: 0.5rem 1rem;
    background-color: #c20017;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    min-width: 100px;
}

.inverted-button:hover {
    background-color: #a00014;
}

.button-container {
    margin-top: 1rem;
    text-align: center;
}

.silo-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.no-silos-message {
  text-align: center;
  font-size: 1.2rem;
  color: #c20017;
  padding: 2rem;
  font-weight: bold;
}

.info-banner {
  width: 100%;
  overflow: hidden;
  background-color: #f8f8f8;
  padding: 0.5rem 1rem 0.5rem 1rem;
  position: relative;
  height: auto;
  margin-bottom: 0.5rem;
}

.info-text {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: scroll-left 15s linear infinite;
  font-weight: bold;
  font-size: 1rem;
  color: #000;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-100%);
  }
}




/* ======= RESPONSIVE ======= */
@media screen and (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-container,
    .login-form,
    .logged-in-box {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .login-form input,
    .logout-button,
    .header-nav-btn {
        width: 100%;
    }

    .header-nav-btn {
        max-width: 100%;
    }

    .entryblock {
        padding: 1rem;
    }

    .grouped-block__content {
        grid-template-columns: 1fr;
    }

    .header__logo img {
        max-width: 120px;
    }

    .main-header {
        padding-bottom: 1rem;
    }

    .header-inner {
        flex-direction: column;
        gap: 1rem;
    }

    .logo-container,
    .auth-container,
    .auth-logged-in,
    .login-form {
        width: 100%;
    }
}

.user-form-container {
    margin-top: 2rem;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
}

.user-form-container h3 {
    margin-bottom: 1rem;
    color: #c20017;
}

h3 {
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    color: #c20017;
}

.user-add-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.success-message,
.error-message {
    margin-top: 1rem;
    font-weight: bold;
}

.success-message {
    color: green;
}

.error-message {
    color: #c20017;
}

input[disabled], textarea[disabled],
select[disabled='disabled']{
   -webkit-text-fill-color: rgba(0, 0, 0, 1); 
   -webkit-opacity: 1; 
   color: rgba(0, 0, 0, 1); 
   background: white;
}
