/* =============================================================
   1414.pl/count — licznik słów
   Komponenty (.btn, .textarea, .stats/.stat, .reveal, .collapsible)
   przychodzą z systemu d1414. Tu layout strony + lokalne kafle.
   ============================================================= */

#main-wrapper {
    transition: padding-top 0.3s ease;
}

#main-wrapper.shifted-up {
    padding-top: 15vh;
}

#input-container {
    width: 100%;
    position: relative;
    margin-bottom: 1.5rem;
}

#text-input {
    font-size: 1.5rem;
    font-weight: var(--font-thin);
    padding: var(--space-md);
    text-align: left;
    min-height: 56px;
    max-height: 25vh;
    resize: none;
    line-height: 1.5;
    scrollbar-width: thin;
    scrollbar-color: var(--color-muted) transparent;
    overflow: hidden;
}

/* Custom scrollbar */
#text-input::-webkit-scrollbar {
    width: 4px;
}

#text-input::-webkit-scrollbar-track {
    background: transparent;
}

#text-input::-webkit-scrollbar-thumb {
    background: var(--color-muted);
    border-radius: var(--radius);
}

#text-input::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}

#reset-btn {
    top: 10px;
}

/*  Stats — kafle = systemowe .stat w siatce .stats; lokalnie ramka karty  */

#stats-wrapper {
    width: 100%;
}

#stats-wrapper .stats {
    margin-bottom: 12px;
}

/* hover/lift/glow daje systemowe .interactive (na .stat) — tu tylko ramka kafla */
#stats-wrapper .stat {
    border: var(--border-width) solid var(--color-muted);
    border-radius: var(--radius);
    padding: 10px;
}

/*  Expand toggle (systemowy .btn--block; lokalnie tylko strzałka)  */
#expand-btn .arrow {
    transition: transform var(--transition) ease;
    font-size: 10px;
}

#expand-btn.expanded .arrow {
    transform: rotate(180deg);
}

/*  Detailed stats — zwijanie przez systemowy .collapsible (max-height z JS)  */
#detailed-stats.is-open {
    margin-top: var(--space-md);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.detail-card {
    border: var(--border-width) solid var(--color-divider);
    border-radius: var(--radius);
    padding: 10px;
    text-align: center;
    transition: all var(--transition) ease;
}

.detail-card:hover {
    border-color: var(--color-muted);
}

.detail-value {
    font-size: 1.2rem;
    font-weight: var(--font-regular);
    letter-spacing: var(--letter-spacing);
    line-height: 1;
    margin-bottom: 4px;
}

.detail-label {
    font-size: var(--text-xs);
    font-weight: var(--font-light);
    color: var(--color-text-muted);
    letter-spacing: var(--letter-spacing);
}

/* Responsive */
@media (max-width: 600px) {
    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
