/* Limited Lifetime Warranty - Styling */

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #F8F8F8;
    --text-primary: #1A1A1A;
    --text-secondary: #6A6A6A;
    --error: #C1121F;
    --highlight: #FFF200;
    --border: #D6D6D6;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-primary);
    background-color: var(--bg-color);
    letter-spacing: -0.015em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 24px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    margin-bottom: 48px;
    position: relative;
}

.header-controls {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Tablet and below - header controls */
@media (max-width: 768px) {
    .header-controls {
        position: static;
        margin-bottom: 16px;
        justify-content: flex-end;
    }
}

/* Mobile - header controls */
@media (max-width: 480px) {
    .header-controls {
        margin-bottom: 12px;
        gap: 8px;
    }
}

.large-print-toggle {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    background: none;
    border: 1px solid var(--border);
    padding: 6px 12px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    transition: none;
    border-radius: 0;
}

.large-print-toggle:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.large-print-toggle.active {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: var(--text-primary);
    color: var(--bg-color);
}

.title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Submission Ticker */
.submission-ticker {
    margin-top: 24px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    background: var(--bg-color);
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
}

.submission-ticker.hidden {
    display: none;
}

.ticker-label {
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0;
}

.ticker-count {
    font-size: 18px;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    margin: 0;
    font-weight: 400;
}

.section-header {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    padding-top: 24px;
}

/* Content */
.content {
    flex: 1;
}

/* Legal Block */
.legal-block {
    font-size: 13px;
    color: rgba(26, 26, 26, 0.7);
    line-height: 1.45;
    margin-bottom: 24px;
    max-width: 100%;
}

.legal-block p {
    margin-bottom: 12px;
}

.legal-block p:last-child {
    margin-bottom: 0;
}

.legal-block.emphasis p {
    font-weight: 700;
    color: var(--text-primary);
}

.legal-block.signature {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

/* Highlight */
.highlight {
    display: inline-block;
    background: var(--highlight);
    padding: 0 4px;
    color: var(--text-primary);
}

.highlight-section {
    margin: 32px 0;
}

/* Typography */
.emphasis {
    font-weight: 700;
    color: var(--text-primary);
}

.monospace {
    font-family: 'JetBrains Mono', 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 13px;
    letter-spacing: 0;
}

/* Buttons */
.button {
    display: inline-block;
    padding: 12px 24px;
    border: 2px solid var(--text-primary);
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    border-radius: 0;
    transition: none;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.button:hover {
    background: var(--text-primary);
    color: var(--bg-color);
}

.button.secondary {
    border-color: var(--text-secondary);
    color: var(--text-secondary);
}

.button.secondary:hover {
    background: var(--text-secondary);
    color: var(--bg-color);
}

.action-section {
    margin: 48px 0;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.button-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Forms */
.claim-form,
.appeal-form {
    margin: 32px 0;
}

.form-section {
    margin-bottom: 32px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    color: var(--text-primary);
}

/* Sliders */
.slider-container {
    margin-top: 8px;
}

.slider {
    width: 100%;
    height: 4px;
    background: var(--border);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin-bottom: 8px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--text-primary);
    cursor: pointer;
    border-radius: 0;
}

.slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--text-primary);
    cursor: pointer;
    border: none;
    border-radius: 0;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Checkboxes */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: rgba(26, 26, 26, 0.7);
    cursor: pointer;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--text-primary);
}

/* Textarea */
.textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid var(--border);
    background: var(--bg-color);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-primary);
    resize: vertical;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}

.textarea:focus {
    outline: 2px solid var(--text-primary);
    outline-offset: -2px;
    border-color: var(--text-primary);
}

.char-counter {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-secondary);
}

/* Stamp */
.stamp-container {
    margin: 32px 0;
    text-align: center;
}

.stamp {
    display: inline-block;
    padding: 16px 24px;
    border: 2px solid var(--text-primary);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.1em;
    background: var(--bg-color);
}

/* Processing */
.processing {
    margin: 32px 0;
    padding: 24px;
    border: 1px solid var(--border);
    background: var(--bg-color);
}

.processing p {
    margin-bottom: 8px;
}

.processing p:last-child {
    margin-bottom: 0;
}

.hidden {
    display: none;
}

/* Lists */
.warranty-list {
    list-style: none;
    padding-left: 0;
    margin: 16px 0;
}

.warranty-list li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.warranty-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--text-primary);
}

/* Citations */
.citations-table {
    margin: 32px 0;
}

.citation-item {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.citation-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.citation-title {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.citation-desc {
    font-size: 13px;
    color: rgba(26, 26, 26, 0.7);
    line-height: 1.45;
    margin-bottom: 8px;
}

.citation-link {
    font-size: 11px;
    color: var(--text-secondary);
}

.citation-link a {
    color: var(--text-secondary);
    text-decoration: underline;
}

.citation-link a:hover {
    color: var(--text-primary);
}

/* Footer */
.footer {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 400;
}

.nav a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* Responsive Design */

/* Tablet and below (768px) */
@media (max-width: 768px) {
    .container {
        padding: 20px 16px;
    }

    .title {
        font-size: 20px;
    }

    .subtitle {
        font-size: 12px;
    }

    .section-header {
        font-size: 13px;
    }

    .action-section {
        flex-direction: column;
    }

    .action-section .button {
        width: 100%;
        text-align: center;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group .button {
        width: 100%;
    }

    .nav {
        flex-direction: column;
        gap: 12px;
    }

    .stamp {
        font-size: 14px;
        padding: 12px 16px;
    }

    .submission-ticker {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 10px 12px;
    }

    .ticker-label {
        font-size: 10px;
    }

    .ticker-count {
        font-size: 16px;
    }

    .form-section {
        margin-bottom: 24px;
    }

    .slider {
        height: 6px;
    }

    .slider::-webkit-slider-thumb {
        width: 20px;
        height: 20px;
    }

    .slider::-moz-range-thumb {
        width: 20px;
        height: 20px;
    }

    .checkbox-label {
        font-size: 12px;
    }

    .checkbox-label input[type="checkbox"] {
        width: 18px;
        height: 18px;
        margin-top: 3px;
    }

    .textarea {
        min-height: 100px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .citation-item {
        margin-bottom: 24px;
        padding-bottom: 16px;
    }

    .citation-title {
        font-size: 12px;
    }

    .citation-desc {
        font-size: 12px;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    .container {
        padding: 16px 12px;
    }

    .title {
        font-size: 18px;
    }

    .subtitle {
        font-size: 11px;
    }

    .legal-block {
        font-size: 12px;
        margin-bottom: 20px;
    }

    .button {
        font-size: 12px;
        padding: 10px 20px;
        min-height: 44px; /* Touch target size */
    }

    .large-print-toggle {
        font-size: 10px;
        padding: 8px 12px;
        min-height: 44px;
    }

    .header-controls {
        margin-bottom: 12px;
    }

    .submission-ticker {
        padding: 8px 10px;
        margin-top: 16px;
    }

    .ticker-label {
        font-size: 9px;
    }

    .ticker-count {
        font-size: 14px;
    }

    .form-label {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .slider-labels {
        font-size: 10px;
    }

    .checkbox-group {
        gap: 10px;
    }

    .checkbox-label {
        min-height: 44px; /* Touch target */
        padding: 4px 0;
    }

    .stamp {
        font-size: 12px;
        padding: 10px 12px;
    }

    .processing {
        padding: 16px;
    }

    .modal {
        padding: 8px;
    }

    .modal-content {
        max-height: 96vh;
        border-width: 1px;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-footer {
        padding: 16px;
    }

    .modal-close {
        width: 36px;
        height: 36px;
        font-size: 28px;
        min-height: 44px; /* Touch target */
    }

    .action-section {
        gap: 12px;
    }
}

/* Large screens (1024px and above) */
@media (min-width: 1024px) {
    .container {
        max-width: 900px;
    }

    .modal-content {
        max-width: 800px;
    }
}

/* Very small screens (360px and below) */
@media (max-width: 360px) {
    .container {
        padding: 12px 10px;
    }

    .title {
        font-size: 16px;
    }

    .button {
        font-size: 11px;
        padding: 8px 16px;
    }

    .ticker-count {
        font-size: 12px;
    }
}

/* Tier-based denial styling */
.tier-1 {
    /* Tier 1: Mild/Clinical - Default styling */
    color: rgba(26, 26, 26, 0.7);
}

.tier-2 {
    /* Tier 2: Condescending - Yellow highlight emphasis */
    background: rgba(255, 242, 0, 0.1);
    padding: 12px;
    border-left: 3px solid var(--highlight);
}

.tier-3 {
    /* Tier 3: Fatalistic - Red accent */
    border-left: 4px solid var(--error);
    padding-left: 16px;
}

.tier-3-text {
    color: var(--error);
    position: relative;
}

.tier-3-text::after {
    content: " — Non-reversible condition";
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 400;
    display: block;
    margin-top: 4px;
}

.tier-4 {
    /* Tier 4: Existential - Smaller, whisper-like */
    margin: 24px 0;
    padding: 16px 0;
}

.tier-4-text {
    font-size: 11px;
    color: rgba(26, 26, 26, 0.5);
    line-height: 1.6;
    font-style: italic;
    letter-spacing: 0.02em;
}

/* Large Print Mode */
body.large-print .legal-block {
    font-size: 16px;
    line-height: 1.5;
}

body.large-print .legal-block p {
    margin-bottom: 16px;
}

body.large-print .form-label {
    font-size: 16px;
}

body.large-print .checkbox-label {
    font-size: 16px;
}

body.large-print .textarea {
    font-size: 16px;
}

body.large-print .char-counter {
    font-size: 13px;
}

body.large-print .monospace {
    font-size: 16px;
}

body.large-print .citation-title {
    font-size: 16px;
}

body.large-print .citation-desc {
    font-size: 16px;
}

body.large-print .warranty-list li {
    font-size: 16px;
}

/* Large print responsive adjustments */
@media (max-width: 768px) {
    body.large-print .legal-block {
        font-size: 15px;
    }

    body.large-print .form-label {
        font-size: 15px;
    }

    body.large-print .checkbox-label {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    body.large-print .legal-block {
        font-size: 14px;
    }

    body.large-print .form-label {
        font-size: 14px;
    }

    body.large-print .checkbox-label {
        font-size: 14px;
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 248, 248, 0.95);
    backdrop-filter: blur(2px);
}

.modal-content {
    position: relative;
    background: var(--bg-color);
    border: 2px solid var(--text-primary);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: none;
    -webkit-overflow-scrolling: touch;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-warning {
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    transition: none;
}

.modal-close:hover {
    color: var(--text-secondary);
}

.modal-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    background: var(--bg-color);
    position: sticky;
    bottom: 0;
}

/* Print styles */
@media print {
    body {
        background: white;
    }

    .footer {
        display: none;
    }

    .button {
        display: none;
    }

    .header-controls {
        display: none;
    }

    .modal {
        display: none;
    }
}

/* Modal responsive styles are handled in main responsive section above */

