/*
 * analog.css - Fixed with centered form and sticky footer
 * Copyright (C) 2026 fred
 *
 * Distributed under terms of the BSD 3-Clause license.
 */

:root {
    --link-color: #558;
    --link-bg-color: #e7e7e7;
    --radius: 16px;
}

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

body {
    background: #f5f7fc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333;
}

a {
  color: var(--link-color);
  font-weight: bold;
  text-decoration: none;
}

a:hover {
    background-color: var(--link-bg-color);
}

code {
    font-family: "Courier New", Courier, monospace;
    background-color: #eee;
    padding: 0px 3px;
}

header {
    background: linear-gradient(135deg, #0a2342, #1c3d73);
    text-align: center;
    border-bottom: 4px solid #f80;
    padding: 20px 0;
    width: 100%;
    flex-shrink: 0;
}

header h1 {
    color: #DAF7A6;
    text-align: center;
    font-size: 3rem;
    margin: 1rem 0 2rem 0;
    text-shadow: 1px 1px 0 #7a9e4a,
    2px 2px 0 #5a7a2a,
    3px 3px 0 #3a5a1a,
    4px 4px 0 #1a3a0a,
    5px 5px 8px rgba(0, 0, 0, 0.3);
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

nav li a {
  color: #fff;
  background: #335;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  border: 1px solid #777;

}

nav ul a:hover,
nav ul a:focus {
  background: #337;
}

nav ul a[aria-current="page"] {
  background: #686;
}

main {
    padding: 2em;
    max-width: 1024px;
    width: 100%;
    margin: 0 auto;
    display: block;
}

.main-content {
    font-size: 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.top-div,
.bottom-div {
    padding: 1rem 2rem;
    width: 75%;
}

.bottom-div {
    margin-top: 1.5rem;
}

.processing,
.form-card {
    width: 600px;
    max-width: 100%;
    background: #ffffff;
    border-radius: var(--radius);
    box-shadow: 0 20px 40px -12px rgba(0, 20, 30, 0.15), 0 8px 24px -6px rgba(0, 0, 0, 0.05);
    padding: 2rem 2rem 2.25rem;
    transition: box-shadow 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(0px);
}

.form-card h2,
.processing h2 {
    text-align: center;
    font-weight: 600;
    font-size: 1.9rem;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eef2f9;
    word-break: break-word;
}

.responsive-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
    padding: 0.5rem 0;
}

.responsive-2col .label {
    font-weight: 600;
    color: #1e2f4a;
    padding: 0.3rem 0;
    text-align: right;
}

.responsive-2col .value {
    color: #0a1a2f;
    padding: 0.3rem 0;
}

.responsive-2col .row-full {
    grid-column: 1 / -1;
    text-align: center;
}

@media (max-width: 640px) {
    .responsive-2col {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .responsive-2col .label {
        font-weight: 600;
        margin-top: 0.5rem;
    }

    .responsive-2col .label:first-of-type {
        margin-top: 0;
    }

    .responsive-2col .value {
        border-bottom: 1px solid #eef2f9;
        padding-bottom: 0.5rem;
    }

    .responsive-2col .value:last-child {
        border-bottom: none;
    }
}

.form-group {
    margin-top: 1.5rem;
}

.form-group:first-of-type {
    margin-top: 1.25rem;
}

label {
    display: block;
    font-weight: 900;
    margin-left: 0.6rem;
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

input[type="text"],
input[type="file"] {
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 1rem;
    background: #f8faff;
    border: 1.5px solid #e2e8f2;
    border-radius: calc(var(--radius) / 2);
    transition: all 0.2s ease;
    color: #0a1a2f;
    font-weight: 450;
    outline: none;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.02);
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="file"]:focus {
    border-color: #3b6eff;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 110, 255, 0.10), inset 0 1px 3px rgba(0,0,0,0.02);
}

input[type="file"] {
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    background: #f8faff;
    font-size: 0.95rem;
    color: #1a2a44;
}

input[type="file"]::file-selector-button {
    background: #eef3fe;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: calc(var(--radius) / 2);
    font-weight: 500;
    color: #1e3a7a;
    margin-right: 1rem;
    transition: background 0.2s, transform 0.1s;
    cursor: pointer;
    border: 1px solid #d6e0f0;
    font-size: 0.9rem;
}

input[type="file"]::file-selector-button:hover {
    background: #dce6fc;
    border-color: #b0c6f0;
}

input[type="file"]:focus::file-selector-button {
    outline: 2px solid #3b6eff;
    outline-offset: 2px;
}

.file-hint {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
    padding-left: 0.3rem;
    opacity: 0.8;
}

.file-error {
    background-color: #f33;
    color: #fff;
    font-weight: bold;
    padding: 1em;
    border-radius: calc(var(--radius) / 2);
    opacity: 1;
}


.submit-wrap {
    margin-top: 2rem;
    text-align: center;
}


button[type="submit"] {
    background: var(--link-color);
    color: white;
    border: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.8rem 2.8rem;
    border-radius: calc(var(--radius) / 2);
    cursor: pointer;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 8px rgba(20, 40, 80, 0.08);
    width: 100%;
    max-width: 280px;
}

button[type="submit"]:hover {
    background: #0f1e36;
    box-shadow: 0 8px 18px -6px rgba(20, 50, 100, 0.25);
    transform: scale(1.01);
}

button[type="submit"]:active {
    transform: scale(0.98);
    background: #0f2547;
}

.flash-messages {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 40, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.flash-modal-box {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: #dfe;
    border-radius: var(--radius);
    box-shadow: 0 20px 40px -12px rgba(0, 20, 30, 0.25), 0 8px 24px -6px rgba(0, 0, 0, 0.1);
    padding: 3rem 1.75rem 1.75rem;
    animation: slideIn 0.25s ease-out;
}

.flash-modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.9rem;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--link-color);
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: calc(var(--radius) / 2);
}

.flash-modal-close:hover {
    background: #eef2f9;
    color: #1a2f4f;
}

.flash {
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 1.1rem;
    border: 1px solid #fff;
}

.flash:last-child {
    margin-bottom: 0;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.flash-info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.flash-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 640px) {
    .form-card {
        padding: 1.5rem;
    }
    .form-card h2 {
        font-size: 1.7rem;
    }
    button[type="submit"] {
        max-width: 100%;
    }
}

.field-spacer {
    margin-top: 0.3rem;
}

.demo-note {
    display: none;
}

.upload-field {
    margin-top: 1.6rem;
}

.top-spacer {
    margin-top: 1em;
}

.error {
    background-color: #f00;
    box-shadow: 0 4px 8px rgba(20, 40, 80, 0.08);
    color: #ddd;
    font-weight: bold;
    line-height: 1.6rem;
    border-radius: calc(var(--radius) / 2);
    padding: 1.5rem;
}

hr {
  border: none;
  border-bottom: 2px solid #eef2f9;
  height: 0;
  width: 100%;
}

footer {
    font-size: .8em;
    background-color: #322;
    text-align: right;
    color: #cccccc;
    line-height: 1.1rem;
    padding: 1em 4em;
    flex-shrink: 0;
    margin-top: auto;
}

footer a {
    color: yellow;
    text-decoration: none;
    font-weight: normal;
}

footer a:hover {
    text-decoration: underline;
    background-color: transparent;
}

.dir-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: calc(var(--radius) / 2);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dir-table th {
    text-align: left;
    padding: 12px 16px;
    background: #eef2f7;
    font-weight: 600;
    color: #1a2f4a;
    border-bottom: 2px solid #dce4ec;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dir-table td {
    padding: 10px 16px;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
}

.dir-table tr:hover {
    background: #f7faff;
}

.dir-table .col-icon {
    width: 44px;
    text-align: center;
    font-size: 18px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: calc(var(--radius) / 2);
    width: 90%;
    max-width: 720px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: fadeSlideIn 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: var(--radius) var(--radius) 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: #1a2a4a;
}

.modal-close {
    font-size: 2rem;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: #000;
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-body .faq-item {
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid #eee;
}

.modal-body .faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.modal-body .faq-item h3 {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
    color: #1a2a4a;
}

.modal-body .faq-item p {
    margin: 0;
    padding-left: 2rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
}

.modal-footer {
    padding: 14px 24px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
    background: #f8f9fa;
    border-radius: 0 0 var(--radius) var(--radius);
}

.close-modal-btn {
    background: var(--link-color);
    color: white;
    border: none;
    padding: 8px 24px;
    border-radius: calc(var(--radius) / 2);
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.close-modal-btn:hover {
    background: #0f1e36;
}

.faq-link {
  color: var(--link-color);
  font-weight: bold;
  text-decoration: none;
}

.faq-link:hover {
    background-color: var(--link-bg-color);
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    .modal-body {
        max-height: 50vh;
        padding: 16px;
    }
    .modal-header h2 {
        font-size: 1.2rem;
    }
}

#overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#alert {
  background-color: #eee;
  padding: 20px 20px;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  min-width: 300px;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#alert h2 {
  width: 100%;
  text-align: center;
  color: #dc3545;
  margin: 0 0 1rem 0;
  border-bottom: 2px solid #dc3545;
}

#alert div {
  margin: 0 0 20px 0;
  font-size: 16px;
  color: #333;
  line-height: 1.6em;
}

#alert button {
  padding: 10px 40px;
  background: var(--link-color);
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#alert button:hover {
  background: #0f1e36;
}

</style>
