/* Font Size Controls - Bottom Drop-up Menu */
.font-size-controls {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
}

.font-size-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--color-surface, #ffffff);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: var(--color-text, #0f172a);
    font-size: 0.875rem;
    font-weight: 500;
}

.font-size-toggle svg {
    width: 18px;
    height: 18px;
}

.font-size-toggle:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    border-color: var(--color-accent, #6366f1);
    background: var(--color-accent-light, #eef2ff);
    color: var(--color-accent, #6366f1);
}

.font-size-dropdown {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: var(--color-surface, #ffffff);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 8px;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.3s ease;
}

.font-size-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.font-size-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--color-text, #0f172a);
    text-align: left;
}

.font-size-option:hover {
    background: var(--color-accent-light, #eef2ff);
    color: var(--color-accent, #6366f1);
}

.font-size-option.active {
    background: var(--color-accent, #6366f1);
    color: white;
}

.size-label {
    font-size: 0.875rem;
    font-weight: 500;
}

.size-preview {
    font-weight: 700;
}

/* Font size classes */
body.font-size-small {
    font-size: 14px;
}

body.font-size-medium {
    font-size: 16px;
}

body.font-size-large {
    font-size: 18px;
}

body.font-size-xlarge {
    font-size: 20px;
}

/* Scale headings proportionally */
body.font-size-small h1 { font-size: 1.75rem; }
body.font-size-small h2 { font-size: 1.4rem; }
body.font-size-small h3 { font-size: 1.15rem; }

body.font-size-large h1 { font-size: 2.5rem; }
body.font-size-large h2 { font-size: 2rem; }
body.font-size-large h3 { font-size: 1.5rem; }

body.font-size-xlarge h1 { font-size: 2.75rem; }
body.font-size-xlarge h2 { font-size: 2.25rem; }
body.font-size-xlarge h3 { font-size: 1.75rem; }

@media (max-width: 768px) {
    .font-size-controls {
        bottom: 20px;
        right: 20px;
    }
    
    .font-size-toggle {
        padding: 10px 16px;
        font-size: 0.8125rem;
    }
    
    .font-size-toggle svg {
        width: 16px;
        height: 16px;
    }
}

[data-theme="dark"] .font-size-toggle,
[data-theme="dark"] .font-size-dropdown {
    background: var(--color-surface, #14141f);
}

[data-theme="dark"] .font-size-option:hover {
    background: var(--color-accent-light, #1e1b4b);
}

@media print {
    .font-size-controls {
        display: none !important;
    }
}
