/* =====================
   STUDY VIEW
   ===================== */
.study-layout
{
    display: flex;
    flex-direction: column;
    height: 100%;
    height: 100dvh;
    overflow: hidden;
}

.study-header-fixed
{
    flex-shrink: 0;
    padding: 0 1rem;
}

.study-body-scroll
{
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 1rem 2rem;
    scrollbar-width: thin;
    scrollbar-color: var(--fern) transparent;
}

.study-body-scroll::-webkit-scrollbar
{
    width: 3px;
}

.study-body-scroll::-webkit-scrollbar-track
{
    background: transparent;
}

.study-body-scroll::-webkit-scrollbar-thumb
{
    background: var(--fern);
    border-radius: 99px;
}

/* Header card (shared moss style) */
.study-header-card
{
    background: var(--moss);
    border-radius: 10px;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.study-header-card::before
{
    content: '';
    position: absolute;
    right: -24px;
    top: -24px;
    width: 160px;
    height: 160px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cellipse cx='50' cy='70' rx='8' ry='30' fill='none' stroke='rgba(255,255,255,0.06)' stroke-width='2'/%3E%3Cellipse cx='50' cy='70' rx='8' ry='30' fill='none' stroke='rgba(255,255,255,0.06)' stroke-width='2' transform='rotate(40 50 70)'/%3E%3Cellipse cx='50' cy='70' rx='8' ry='30' fill='none' stroke='rgba(255,255,255,0.06)' stroke-width='2' transform='rotate(80 50 70)'/%3E%3Cellipse cx='50' cy='70' rx='8' ry='30' fill='none' stroke='rgba(255,255,255,0.06)' stroke-width='2' transform='rotate(120 50 70)'/%3E%3C/svg%3E") center/contain no-repeat;
    pointer-events: none;
}

.study-header-inner
{
    padding: 20px 20px 16px;
    position: relative;
    z-index: 1;
}

.study-back-btn
{
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-on-structure);
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-body);
    padding: 6px 14px;
    margin-bottom: 10px;
    display: inline-block;
    transition: all 0.2s;
}

.study-back-btn:hover
{
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.3);
}

.study-header-label
{
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-on-structure);
    margin-bottom: 4px;
}

.study-header-title
{
    font-family: var(--font-title), var(--font-arabic);
    font-size: 1.5rem;
    font-weight: 700;
    color: #e8f0e0;
    line-height: 1.1;
    margin-bottom: 2px;
}

.study-header-sub
{
    font-size: 0.7rem;
    color: #a8c896;
    font-style: italic;
}

.study-overall-bar-wrap
{
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.study-overall-bar
{
    flex: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 99px;
    overflow: hidden;
}

.study-overall-fill
{
    height: 100%;
    background: linear-gradient(90deg, var(--fern), var(--sprout));
    border-radius: 99px;
}

.study-overall-pct
{
    font-size: 0.72rem;
    color: var(--color-text-on-structure);
    font-family: var(--font-mono);
    min-width: 28px;
}

/* Word list table */
.study-table-wrap
{
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.25rem;
    width: 100%;
}



.study-row
{
    display: flex;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    border-top: 1px solid var(--border);
    transition: background 0.15s;
    gap: 12px;
}

.study-row:first-child
{
    border-top: none;
}

.study-row:hover
{
    background: rgba(61, 92, 46, 0.04);
}

body.dark-mode .study-row:hover
{
    background: rgba(141, 184, 122, 0.05);
}

.study-row-left
{
    flex: 1;
    min-width: 0;
}

.study-row-word-line
{
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}

.study-row-word
{
    font-family: var(--font-title);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
}

.study-row-word.arabic
{
    font-family: var(--font-arabic);
    font-size: 1.15rem;
}

.study-row-harvested
{
    font-size: 0.75rem;
    flex-shrink: 0;
}

.study-row-xp
{
    display: flex;
    align-items: center;
    gap: 6px;
}

.study-row-status
{
    font-size: 0.72rem;
    font-style: italic;
    color: var(--muted);
    min-width: 56px;
}

.study-row-bar
{
    flex: 1;
    height: 3px;
    background: rgba(61, 92, 46, 0.12);
    border-radius: 99px;
    overflow: hidden;
    min-width: 48px;
    max-width: 80px;
}

body.dark-mode .study-row-bar
{
    background: rgba(141, 184, 122, 0.12);
}

.study-row-bar-fill
{
    height: 100%;
    background: linear-gradient(90deg, var(--fern), var(--sprout));
    border-radius: 99px;
}

.study-row-num
{
    font-size: 0.72rem;
    font-family: monospace;
    color: var(--muted);
    opacity: 0.5;
    flex-shrink: 0;
}

.study-row-right
{
    text-align: right;
    flex-shrink: 0;
    min-width: 80px;
}

.study-row-translation
{
    font-family: var(--font-arabic);
    font-size: 1.1rem;
    color: var(--text);
    opacity: 0.45;
    direction: rtl;
    line-height: 1.2;
}

.study-row-translation.non-arabic
{
    font-family: var(--font-body);
    font-size: 0.9rem;
    direction: ltr;
}

.study-harvest-btn
{
    width: 100%;
    background: var(--action);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 16px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: var(--font-body);
    cursor: pointer;
    letter-spacing: 0.05em;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(61, 92, 46, 0.25);
}

.study-harvest-btn:hover
{
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.study-row-plant {
    font-size: 1.4rem;
    flex-shrink: 0;
    line-height: 1;
}