/* Reset body styling */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    min-height: 100vh;         /* Ensure body takes the full viewport height */
    display: flex;
    flex-direction: column;
}

/* Ensure tool content displays first and takes remaining space */
#tool-container {
    flex: 1;                  /* Allows tool content to grow and take available space */
    padding: 20px;
}

/* Footer styling: pinned at the bottom */
#info {
    box-sizing: border-box;
    background-color: #f1f1f1; /* Light grey background */
    padding: 10px;             /* Add padding for some space inside the band */
    text-align: center;        /* Center the text in the info section */
    font-size: 0.8em;          /* Make the text smaller */
    color: #666;               /* Light grey color for the text */
    width: 100%;               /* Ensure it spans the full width */
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1); /* Light shadow for definition */
}

#info a {
    color: #007bff;           /* Standard link color */
    text-decoration: none;
    font-size: 0.8em;         /* Match link font size with the rest of the section */
}

#info a:hover {
    text-decoration: underline;
}

.app-title {
    font-size: 1.5rem;
    margin: 0 0 0.75rem;
}

.app-introduction {
    line-height: 1.5;
    margin: 0 0 0.75rem;
}

.about-button,
.about-header button {
    font: inherit;
    padding: 0.5rem 0.8rem;
    border: 1px solid #526176;
    border-radius: 0.3rem;
    background: #fff;
    color: #1f2937;
    cursor: pointer;
}

.about-button {
    display: block;
    margin-bottom: 1.5rem;
}

.about-button:hover,
.about-header button:hover {
    background: #edf2f7;
}

.about-button:focus-visible,
#about-dialog :focus-visible {
    outline: 3px solid #174ea6;
    outline-offset: 3px;
}

#inputText {
    box-sizing: border-box;
    width: 100%;
    max-width: 50rem;
}

#about-dialog {
    box-sizing: border-box;
    width: min(44rem, calc(100% - 2rem));
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    margin: auto;
    padding: 0;
    border: 1px solid #526176;
    border-radius: 0.6rem;
    color: #1f2937;
    background: #fff;
    font-size: 1rem;
    line-height: 1.6;
    overflow-y: auto;
}

#about-dialog::backdrop {
    background: rgb(15 23 42 / 55%);
}

html:has(#about-dialog[open]) {
    overflow: hidden;
}

.about-header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #cbd5e1;
    background: #fff;
}

.about-header h2 {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.3;
}

.about-header form {
    flex-shrink: 0;
    margin: 0;
}

.about-content {
    padding: 0.25rem 1.25rem 1.25rem;
}

.about-content h3 {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.1rem;
}

.about-content li + li {
    margin-top: 0.6rem;
}

.about-content a {
    color: #174ea6;
    text-decoration: underline;
    overflow-wrap: anywhere;
}
