/* wartime.css - WW2 1940s Wartime Command Center Design System */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
    /* Chalkboard & Wall Colors */
    --chalkboard-slate: #2a3439;
    --chalkboard-dark: #1f2629;
    --chalk-dust: #d4cfc4;

    /* Paper & Document Colors */
    --manila-paper: #e8dcc4;
    --aged-paper: #d9cdb0;
    --paper-shadow: rgba(0, 0, 0, 0.3);
    --paper-edge: #c4b89a;

    /* Ink & Type Colors */
    --navy-ink: #1a2942;
    --faded-ink: #3a4a5c;
    --typewriter-black: #0d1117;

    /* Military Accent Colors */
    --stamp-red: #b8312f;
    --classified-red: #d64545;
    --brass-yellow: #d4a574;
    --officer-blue: #3d5a80;
    --approval-green: #3a5f3a;

    /* Metal & Hardware */
    --paperclip-silver: #a8b2ba;
    --pin-brass: #b8924f;
    --steel-grey: #5a6770;

    /* Typography */
    --font-typewriter: 'Courier Prime', 'American Typewriter', 'Courier New', Courier, monospace;
    --font-stencil: 'Special Elite', 'Courier New', monospace;
    --font-handwritten: 'Permanent Marker', cursive;
}

/* ===== PAPER DOCUMENT COMPONENTS ===== */

/* Base paper document style - manila folder aesthetic */
.paper-document {
    background: linear-gradient(135deg, var(--manila-paper) 0%, var(--aged-paper) 100%);
    border: 1px solid var(--paper-edge);
    box-shadow:
        0 2px 8px var(--paper-shadow),
        inset 0 0 60px rgba(0, 0, 0, 0.03),
        inset -1px -1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    padding: 30px;
    color: var(--navy-ink);
}

/* Worn paper edges effect */
.paper-document::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,.01) 2px, rgba(0,0,0,.01) 3px);
    pointer-events: none;
    opacity: 0.5;
}

/* Paper with paperclip attachment */
.paper-clipped {
    margin-top: 25px;
}

.paper-clipped::after {
    content: '';
    position: absolute;
    top: -15px;
    right: 30px;
    width: 40px;
    height: 15px;
    background: linear-gradient(180deg, var(--paperclip-silver) 0%, #8a939b 100%);
    border-radius: 20px 20px 0 0;
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.5),
        inset 0 -1px 1px rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid #9aa3ab;
    border-bottom: none;
}

/* Alternative: Paper with brass pin */
.paper-pinned::after {
    content: '📌';
    position: absolute;
    top: -8px;
    right: 20px;
    font-size: 24px;
    filter: hue-rotate(20deg) brightness(0.8);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transform: rotate(25deg);
}

/* ===== STAMP COMPONENTS ===== */

/* Red rubber stamp effect */
.stamp {
    display: inline-block;
    padding: 8px 16px;
    border: 3px solid var(--stamp-red);
    color: var(--stamp-red);
    font-family: var(--font-stencil);
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 3px;
    transform: rotate(-3deg);
    background: radial-gradient(ellipse at center, rgba(184, 49, 47, 0.1) 0%, transparent 70%);
    opacity: 0.85;
}

.stamp.classified {
    border-color: var(--classified-red);
    color: var(--classified-red);
    font-size: 1.2rem;
    padding: 10px 20px;
}

.stamp.approved {
    border-color: var(--approval-green);
    color: var(--approval-green);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
}

/* ===== TYPEWRITER TEXT STYLING ===== */

.typewriter-text {
    font-family: var(--font-typewriter);
    color: var(--navy-ink);
    letter-spacing: 0.5px;
    line-height: 1.6;
}

.typewriter-heading {
    font-family: var(--font-typewriter);
    color: var(--navy-ink);
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
    border-bottom: 2px solid var(--navy-ink);
    padding-bottom: 8px;
    margin-bottom: 20px;
}

/* Stencil military headings */
.stencil-heading {
    font-family: var(--font-stencil);
    color: var(--navy-ink);
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 4px;
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 25px;
}

/* ===== FORM ELEMENTS - TYPEWRITER STYLE ===== */

.typewriter-input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.8) !important;
    border: none;
    border-bottom: 2px solid var(--navy-ink);
    color: var(--typewriter-black) !important;
    font-family: var(--font-typewriter);
    font-size: 1rem;
    letter-spacing: 1px;
    box-sizing: border-box;
    transition: all 0.3s;
}

.typewriter-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom-color: var(--officer-blue);
    box-shadow: 0 1px 0 var(--officer-blue);
}

.typewriter-input::placeholder {
    color: var(--faded-ink) !important;
    font-style: italic;
    opacity: 0.7;
}

/* ===== BUTTONS - OFFICIAL STAMP STYLE ===== */

.official-button {
    padding: 12px 28px;
    background: var(--manila-paper);
    border: 3px solid var(--navy-ink);
    color: var(--navy-ink);
    font-family: var(--font-stencil);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    box-shadow:
        0 3px 0 var(--steel-grey),
        0 4px 8px rgba(0, 0, 0, 0.2);
}

.official-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow:
        0 5px 0 var(--steel-grey),
        0 6px 12px rgba(0, 0, 0, 0.3);
}

.official-button:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow:
        0 1px 0 var(--steel-grey),
        0 2px 4px rgba(0, 0, 0, 0.2);
}

.official-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: var(--steel-grey);
    color: var(--steel-grey);
}

/* Primary action button - red stamp */
.official-button.primary {
    border-color: var(--stamp-red);
    color: var(--stamp-red);
    box-shadow:
        0 3px 0 #8a2321,
        0 4px 8px rgba(0, 0, 0, 0.2);
}

.official-button.primary:hover:not(:disabled) {
    box-shadow:
        0 5px 0 #8a2321,
        0 6px 12px rgba(0, 0, 0, 0.3);
}

.official-button.primary:active:not(:disabled) {
    box-shadow:
        0 1px 0 #8a2321,
        0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Secondary action button - officer blue */
.official-button.secondary {
    border-color: var(--officer-blue);
    color: var(--officer-blue);
    box-shadow:
        0 3px 0 #2a3f56,
        0 4px 8px rgba(0, 0, 0, 0.2);
}

.official-button.secondary:hover:not(:disabled) {
    box-shadow:
        0 5px 0 #2a3f56,
        0 6px 12px rgba(0, 0, 0, 0.3);
}

.official-button.secondary:active:not(:disabled) {
    box-shadow:
        0 1px 0 #2a3f56,
        0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ===== FOLDER TAB COMPONENT ===== */

.folder-tab {
    background: linear-gradient(180deg, var(--manila-paper) 0%, var(--aged-paper) 100%);
    border: 2px solid var(--paper-edge);
    border-bottom: none;
    padding: 10px 20px;
    display: inline-block;
    font-family: var(--font-typewriter);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--navy-ink);
    position: relative;
    top: 2px;
    border-radius: 4px 4px 0 0;
}

/* ===== OFFICIAL SEAL ===== */

.official-seal {
    width: 60px;
    height: 60px;
    border: 3px solid var(--brass-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, var(--manila-paper) 0%, var(--aged-paper) 100%);
    box-shadow:
        0 0 0 2px var(--navy-ink),
        0 3px 8px rgba(0, 0, 0, 0.3);
    font-family: var(--font-stencil);
    font-size: 10px;
    color: var(--navy-ink);
    text-align: center;
    line-height: 1.1;
    font-weight: bold;
}

/* ===== TABLE - LOGBOOK STYLE ===== */

.logbook-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-typewriter);
    background: rgba(255, 255, 255, 0.3);
}

.logbook-table thead {
    background: var(--navy-ink);
    color: var(--manila-paper);
}

.logbook-table th {
    padding: 12px 15px;
    text-align: left;
    font-family: var(--font-stencil);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    border-bottom: 2px solid var(--navy-ink);
}

.logbook-table td {
    padding: 10px 15px;
    border-bottom: 1px solid var(--paper-edge);
    color: var(--navy-ink);
}

.logbook-table tbody tr:hover {
    background: rgba(61, 90, 128, 0.1);
}

/* ===== ALERT MESSAGES - TELEGRAM STYLE ===== */

.telegram-message {
    background: var(--manila-paper);
    border: 2px solid var(--navy-ink);
    border-left: 6px solid var(--officer-blue);
    padding: 15px 20px;
    margin-bottom: 20px;
    font-family: var(--font-typewriter);
    color: var(--navy-ink);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    position: relative;
}

.telegram-message::before {
    content: '⚠';
    position: absolute;
    top: 12px;
    left: -20px;
    font-size: 20px;
    background: var(--manila-paper);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--officer-blue);
}

.telegram-message.error {
    border-left-color: var(--stamp-red);
}

.telegram-message.error::before {
    content: '✖';
    border-color: var(--stamp-red);
}

.telegram-message.success {
    border-left-color: var(--approval-green);
}

.telegram-message.success::before {
    content: '✓';
    border-color: var(--approval-green);
}

/* ===== ANIMATIONS ===== */

@keyframes document-place {
    from {
        opacity: 0;
        transform: translateY(-10px) rotate(-1deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
}

@keyframes stamp-press {
    0% {
        opacity: 0;
        transform: rotate(-3deg) scale(1.5);
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 0.85;
        transform: rotate(-3deg) scale(1);
    }
}

@keyframes typewriter-type {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 100%;
        opacity: 1;
    }
}

.animate-document {
    animation: document-place 0.5s ease-out;
}

.animate-stamp {
    animation: stamp-press 0.4s ease-out;
}

/* ===== CHALKBOARD BACKGROUND (for body) ===== */

.chalkboard-wall {
    background: linear-gradient(135deg, var(--chalkboard-slate) 0%, var(--chalkboard-dark) 100%);
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,.015) 2px, rgba(255,255,255,.015) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,255,255,.015) 2px, rgba(255,255,255,.015) 4px),
        linear-gradient(135deg, var(--chalkboard-slate) 0%, var(--chalkboard-dark) 100%);
    position: relative;
}

/* Subtle chalk dust texture */
.chalkboard-wall::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" /><feColorMatrix type="saturate" values="0" /></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.02"/></svg>');
    pointer-events: none;
    z-index: 0;
}

/* ===== DIVIDER - PERFORATED TEAR LINE ===== */

.tear-line {
    height: 1px;
    background-image: repeating-linear-gradient(90deg, var(--paper-edge) 0px, var(--paper-edge) 5px, transparent 5px, transparent 10px);
    margin: 20px 0;
    position: relative;
}

.tear-line::before,
.tear-line::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--paper-edge);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.tear-line::before {
    left: 0;
}

.tear-line::after {
    right: 0;
}
