/* new robust scroll indicator */
.scroll-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    /* spacing logic */
    margin-top: auto;
    /* push to bottom of flex container */
    margin-bottom: 2rem;
    /* small gap from edge */
    /* gap from next section */
    position: relative;
    z-index: 5;
    animation: bounceFade 2s infinite ease-in-out;
}

.scroll-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--muted-text);
    text-transform: uppercase;
    font-weight: 500;
}

.scroll-arrow {
    font-size: 1.5rem;
    color: var(--text-color);
    line-height: 1;
}

@keyframes bounceFade {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.7;
    }

    50% {
        transform: translateY(10px);
        opacity: 1;
    }
}

/* mobile adjustments for perfect fit */
@media (max-width: 768px) {
    .scroll-wrapper {
        margin-top: 3rem;
        /* tighter on mobile */
        margin-bottom: 3rem;
    }

    .scroll-label {
        font-size: 0.6rem;
        /* smaller text */
        letter-spacing: 0.15em;
    }

    .scroll-arrow {
        font-size: 1.25rem;
    }

    /* ensure hero container is properly balanced and centered */
    .hero-centered-content {
        justify-content: center !important;
        padding-top: 2rem;
        padding-bottom: 0 !important;
    }
}

/* claimed items section */
.claimed-items-section {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.toggle-claimed-btn {
    opacity: 0.6;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.toggle-claimed-btn:hover {
    opacity: 1;
}

.claimed-grid {
    opacity: 0.8;
}

.claimed-card {
    cursor: default;
    pointer-events: none;
    border-color: rgba(0, 0, 0, 0.05);
    background: rgba(0, 0, 0, 0.02);
}

.claimed-card .card-title {
    color: var(--muted-text);
}

.claimed-card .status-badge.approved {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

#claimedItemsWrapper {
    width: 100%;
}

#claimedItemsWrapper.hidden {
    display: none;
}

/* accessibility settings modal specific styles */
.modal-box.small {
    max-width: 400px;
}

.settings-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.setting-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.setting-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--text-color);
}

.setting-desc {
    font-size: 0.7rem;
    color: var(--muted-text);
}

.modal-footer {
    padding: 1rem 2rem;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.02);
}

.settings-hint {
    font-size: 0.65rem;
    color: var(--muted-text);
    font-family: var(--font-mono);
    text-align: center;
}

/* toggle switch styling */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input:checked+.slider {
    background-color: var(--accent-color);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

/* font scale controls */
.scale-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-color);
    padding: 0.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.scale-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 500;
    transition: all 0.2s;
}

.scale-btn:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

#fontScaleDisplay {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    min-width: 45px;
    text-align: center;
}

/* high contrast mode */
body.high-contrast {
    --text-color: #000000;
    --muted-text: #222222;
    --accent-color: #004ecc;
    --panel-bg: #ffffff;
    --bg-color: #f8f9fa;
    --border-color: #000000;
}

body.high-contrast .btn-outline {
    border-width: 2px !important;
}

body.high-contrast .card-desc {
    color: #111111;
}

body.high-contrast .label-tech {
    background: #000;
    color: #fff;
}

/* text scaling implementation */
html {
    font-size: 16px;
    transition: font-size 0.2s ease-out;
}

/* icon button styling */
.btn-icon-alt {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.btn-icon-alt:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.05);
    transform: rotate(45deg);
}

body.high-contrast .btn-icon-alt {
    opacity: 1;
    border: 1px solid #000;
}

/* high contrast form overrides */
body.high-contrast .input-group input,
body.high-contrast .input-group select,
body.high-contrast .input-group textarea {
    border: 2px solid #000 !important;
    color: #000 !important;
    background: #fff !important;
}

body.high-contrast .input-group input::placeholder,
body.high-contrast .input-group textarea::placeholder {
    color: #333 !important;
    opacity: 1 !important;
}

/* global high contrast overrides for pages & cards */
body.high-contrast,
body.high-contrast body,
body.high-contrast .auth-page,
body.high-contrast .rw-page,
body.high-contrast .dashboard-page {
    background: #f8f9fa !important;
}

body.high-contrast::before,
body.high-contrast .auth-page::before,
body.high-contrast .rw-page::before {
    display: none !important;
    background: none !important;
}

body.high-contrast .auth-form-card,
body.high-contrast .rw-split-card,
body.high-contrast .admin-container,
body.high-contrast .card,
body.high-contrast .item-card,
body.high-contrast .panel,
body.high-contrast .auth-container {
    background: #fff !important;
    border: 2px solid #000 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.high-contrast .auth-header h1,
body.high-contrast .auth-sub,
body.high-contrast .rw-title,
body.high-contrast .rw-subtitle,
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast p {
    color: #000 !important;
}