/* ABOUTME: Minimal responsive styles for upload.lobb.ie. */
/* ABOUTME: All sizing in rem units per CODING.md §Web design. */

@font-face {
    font-family: 'Special Elite';
    src: url('/static/SpecialElite-Regular.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Iosevka';
    src: url('/static/IosevkaCustom-Regular.woff2') format('woff2');
    font-display: swap;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    min-height: 100vh;
    padding-top: 3.5rem;
}

.banner {
    background: #1a3a5c;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.banner a {
    font-family: 'Special Elite', serif;
    font-size: 2rem;
    text-decoration: none;
    line-height: 1;
}

.banner .domain-highlight {
    color: #f0f0f0;
}

.banner .domain-dim {
    color: #8a9bae;
}

.banner-email {
    position: absolute;
    right: 1rem;
    color: #8a9bae;
    font-size: 0.85rem;
}

.card {
    max-width: 28rem;
    margin: 3rem auto;
    background: #fff;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
}

.card h1 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.card p {
    margin-bottom: 1rem;
    color: #555;
    line-height: 1.5;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
}

input[type="email"] {
    width: 100%;
    padding: 0.625rem;
    border: 0.0625rem solid #ccc;
    border-radius: 0.25rem;
    font-size: 1rem;
    margin-bottom: 1rem;
}

input[type="email"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 0.125rem rgba(37, 99, 235, 0.2);
}

button[type="submit"] {
    width: 100%;
    padding: 0.625rem;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 0.25rem;
    font-size: 1rem;
    cursor: pointer;
}

button[type="submit"]:hover {
    background: #1d4ed8;
}

a {
    color: #2563eb;
}

.upload-area {
    max-width: 56rem;
    margin: 3rem auto;
    background: #fff;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
}

.upload-area h1 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

#drag-drop-area {
    min-height: 11rem;
}

.upload-history {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.upload-history th {
    text-align: left;
    padding: 0.375rem 0.5rem;
    border-bottom: 0.0625rem solid #e5e7eb;
    color: #666;
    font-weight: 500;
}

.upload-history td {
    padding: 0.375rem 0.5rem;
    border-bottom: 0.0625rem solid #f3f4f6;
}

.upload-history code {
    font-size: 0.75rem;
    color: #555;
}

.upload-history code.copyable {
    cursor: pointer;
}

.upload-history code.copyable:hover {
    color: #2563eb;
}

.caption-row {
    margin-bottom: 1rem;
}

.caption-row label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
}

.caption-hint {
    font-weight: 400;
    color: #888;
    font-size: 0.8rem;
}

.caption-row input {
    width: 100%;
    padding: 0.5rem;
    border: 0.0625rem solid #ccc;
    border-radius: 0.25rem;
    font-size: 0.9rem;
}

.caption-row input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 0.125rem rgba(37, 99, 235, 0.2);
}

.caption-cell {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.edit-caption-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    color: #888;
    padding: 0;
}

.edit-caption-btn:hover {
    color: #2563eb;
}

.caption-edit-input {
    padding: 0.2rem 0.375rem;
    border: 0.0625rem solid #2563eb;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    width: 100%;
}

.snippet-actions {
    white-space: nowrap;
}

.snippet-btn {
    background: #f3f4f6;
    border: 0.0625rem solid #e5e7eb;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 600;
    color: #555;
    padding: 0.2rem 0.4rem;
    margin-left: 0.2rem;
    position: relative;
}

.snippet-btn:hover {
    background: #e5e7eb;
    color: #2563eb;
}

.snippet-btn .tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 0.5rem;
    background: #1a1a2e;
    color: #e0e0e0;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    z-index: 300;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.3);
    pointer-events: none;
    width: max-content;
    max-width: 32rem;
}

.snippet-btn:hover .tooltip {
    display: block;
}

.tooltip-title {
    display: block;
    font-weight: 700;
    font-size: 0.75rem;
    color: #fff;
    margin-bottom: 0.5rem;
    padding-bottom: 0.375rem;
    border-bottom: 0.0625rem solid #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.tooltip-code {
    display: block;
    font-family: 'Iosevka', monospace;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #b8c7e0;
    white-space: pre-wrap;
    word-break: break-all;
}

.toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    z-index: 200;
    animation: fadeout 2s forwards;
}

@keyframes fadeout {
    0%, 70% { opacity: 1; }
    100% { opacity: 0; }
}

.result {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f0fdf4;
    border: 0.0625rem solid #bbf7d0;
    border-radius: 0.25rem;
}

.result code {
    font-weight: 600;
}

.error {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #fef2f2;
    border: 0.0625rem solid #fecaca;
    border-radius: 0.25rem;
    color: #991b1b;
}
