/* ==================== PULL TO REFRESH ==================== */
.ptr-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: calc(env(safe-area-inset-top, 0px) + 16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    transform: translateY(var(--pull-distance, 0px));
}

.ptr-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--surface);
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
}

.ptr-spinner {
    width: 24px;
    height: 24px;
    color: var(--primary);
    transition: transform 0.05s linear;
}

.ptr-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.ptr-indicator.ready .ptr-content {
    background: var(--primary);
}

.ptr-indicator.ready .ptr-spinner {
    color: white;
}

.ptr-indicator.ready .ptr-text {
    color: white;
}

.ptr-indicator.refreshing {
    opacity: 1 !important;
    transform: translateY(20px) !important;
}

.ptr-indicator.refreshing .ptr-spinner {
    animation: ptr-spin 0.8s linear infinite;
}

.ptr-indicator.refreshing .ptr-content {
    background: var(--surface);
}

.ptr-indicator.refreshing .ptr-spinner {
    color: var(--primary);
}

.ptr-indicator.refreshing .ptr-text {
    color: var(--text-secondary);
}

@keyframes ptr-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
