@import "tailwindcss";

body { font-family: 'Inter', sans-serif; }

/* Brand Colors */
:root {
    --brand-primary: #0039A6;
    --brand-accent: #FF6B35;
    --brand-text: #242424;
    --brand-bg: #F7F8FA;
    --brand-border: #E5E7EB;
}

.bg-brand-primary { background-color: var(--brand-primary); }
.bg-brand-accent { background-color: var(--brand-accent); }
.text-brand-primary { color: var(--brand-primary); }
.text-brand-accent { color: var(--brand-accent); }
.border-brand-primary { border-color: var(--brand-primary); }
.border-brand-accent { border-color: var(--brand-accent); }

/* Updated CSS for better scaling and multi-page layout */
.sheet-preview {
    background-color: #f1f5f9;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem;
    min-height: 400px;
    scroll-behavior: smooth;
}
#pagesContainer {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    transform-origin: top center;
    transition: transform 0.2s ease-out;
    padding-bottom: 5rem;
}
.page-sheet {
    background: white;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1), 0 10px 20px -5px rgba(0,0,0,0.05);
    position: relative;
    flex-shrink: 0;
    margin-bottom: 2rem;
    border: 1px solid #eef2f6;
}
.label-cell {
    position: absolute;
    outline: 1px dashed #e2e8f0;
    overflow: hidden;
    background: white;
    font-size: 10pt;
    line-height: 1.25;
    word-wrap: break-word;
    display: flex;
    flex-direction: column;
    padding: 6pt;
    cursor: pointer;
    transition: all 0.15s ease;
}
.label-cell:hover {
    outline: 1.5px solid var(--brand-primary);
    box-shadow: inset 0 0 0 2px rgba(0, 57, 166, 0.05);
    z-index: 20;
}
.label-cell.detached {
    border: 2px solid #fbbf24;
    outline: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.custom-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #fbbf24;
    color: #78350f;
    font-size: 7px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 3px;
    z-index: 30;
    pointer-events: none;
    letter-spacing: 0.02em;
}
.reset-link {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: var(--brand-primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 57, 166, 0.2);
    z-index: 30;
    display: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}
.label-cell:hover .reset-link {
    display: block;
}
.reset-link:hover {
    background: #002d84;
    transform: translateY(-1px);
}
/* Alignment helpers for flex item content */
.align-left { align-items: flex-start; text-align: left; }
.align-center { align-items: center; text-align: center; }
.align-right { align-items: flex-end; text-align: right; }

.valign-top { justify-content: flex-start; }
.valign-middle { justify-content: center; }
.valign-bottom { justify-content: flex-end; }
.label-cell.skipped {
    background-color: #f8fafc;
}
.label-cell.skipped::after {
    content: "SKIPPED";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    color: #cbd5e1;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    opacity: 0.6;
}
.label-cell.ghost {
    opacity: 0.4;
    color: #94a3b8;
}
.active-tab {
    border-bottom: 2px solid var(--brand-primary);
    color: var(--brand-primary);
}
.merge-pill {
    cursor: pointer;
    transition: all 0.2s;
}
.merge-pill:hover {
    transform: translateY(-2px);
    background-color: var(--brand-primary);
    color: white;
    box-shadow: 0 4px 8px rgba(0, 57, 166, 0.15);
}

/* FAQ Accordion Styles */
.faq-item { border-bottom: 1px solid #f1f5f9; }
.faq-question {
    width: 100%;
    padding: 1.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #1e293b;
    text-align: left;
    transition: color 0.2s;
}
.faq-question:hover { color: var(--brand-primary); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    color: #64748b;
    line-height: 1.6;
}
.faq-item.open .faq-answer {
    max-height: 500px;
    padding-bottom: 1.5rem;
}
.faq-item.open .chevron { transform: rotate(180deg); }
.chevron { transition: transform 0.3s; }

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
